ORB-SLAM2 source code analysis (monocular) - reference key frame tracking
1. Introduction to Keyframe Tracking
Use the map point of the reference key frame to track the current normal frame.
It is used when there is no speed information, just after relocation, or after the constant speed model tracking fails, and it is not used most of the time. Only the information of the reference frame is used.
- The matching method is SearchByBoW, which matches the feature points of the current frame and the key frame under the same node, does not require projection, and is very fast
- BA optimization (only pose optimization) to provide a rough pose
When the number of feature points matched by the constant velocity model is small, key frame mode tracking will be selected to try to match with the latest key frame. For fast matching, bag of words (BoW) is used to speed up matching
2. Convert the feature points of the current frame into bow vectors, and use the bag-of-words matching method to quickly match the feature points of the current frame and the key frame of the previous frame
3. Use the bit pose of the previous frame as the initial value of the current frame pose
4. Obtain the pose by optimizing the 3D-2D reprojection error
Through the common-view map points of the current frame and the reference key frame, through the 3D-2D reprojection error (transform the map points into the current pixel coordinate system and compare the feature points of the current frame to obtain the error value), the pose of the current frame is calculated. optimization.
5. Eliminate outliers in the optimized matching points
When performing pose optimization, some outliers can be eliminated through reprojection errors of map points, but in the optimization process, they are only marked, and only here are the real deletions