Skip to content

Bug: Reinitializing state of frame before setting it key

When in ProcessorTrackerFeature::process(), it votes for a key frame in last_, the existing non-key frame of last_ is set as key. Also, a new non-key frame is emplaced (and initialized) in incoming_ capture. In other words, the initialization of all the frames (that eventually will become a KF) is performed when the corresponding capture just arrived.

In the time this frame is set as KF, this first initialization (provided by the problem, that calls either processor_motion or returns the state of the last KF) can be improved. In case of not having any ProcessorMotion, it is specially critical (as we discovered in the apriltag demo).

This MR simply adds a new setState() providing a new initialization of the frame of last_, just before setting as key.

Merge request reports