Reread Orb's tracking threading difficulties

Source: Internet
Author: User

1. Initialization

When you get the first frame image and the depth map, first set the first frame pose as the 4*4 unit matrix, and then add keyframes and map points for the entire map. and update the contact of the map point to the keyframe, such as which keyframe the map point is observing, and which map points the keyframe contains. and have to be moved for the processing details of the orb, each map point because of the corresponding key frame of the feature points, need to select the best map points of the most appropriate description, pnewmp->computedistinctivedescriptors (). Then add keyframes for the localmapping thread, as well as some other preparatory work.

2. Normal location Map mode

Subsequent positioning work, mainly by four functions, first if there is speed information, will take Trackwithmotionmodel, no speed information or relocation after the first frame will be used Trackreferencekeyframe (), when the speed of movement, Or for other reasons, the relocation method will always be used to locate the failure. After the successful tracking of the current frame, we also continue to track the local map and optimize the pose in Tracklocalmap. This localmap local map is very confusing and feels very similar to localmapping. But the two are very different, Localmap is composed of a local key frame, a local map point. A local keyframe consists of other keyframes that have a common observation point with the current Keyframe and includes itself. If the localkeyframes is less than 80 frames, continue to add the neighbor keyframes within each localkeyframes, the child and the parent keyframe. Localmapping is calculated to add data to the overall map based on the key frames that are coming in. Localpoints is easy to understand, adding all the visible map points within the local keyframe. Reposition function relocalization, is to search the key frame library to match the key frame, do relative pose calculation.

3. No mapping mode only

In this mode, the relocation is performed first, and then according to the MBVO parameter, the normal tracking and positioning operation is performed or the relocation information is combined. Mbvo True indicates that the current image and the previous frame map point match number is less than 10, it is possible that the movement is too fast reason.

    1. If the last location display, MBVO is 0, then the normal location tracking, but found after tracking mbvo in Trackwithmotionmodel is set to 1, and the location is successful, the normal update speed and display operations, if MBVO is still 0, Then we must first match with the local map, optimize the posture, and then carry out the subsequent operation. Because if MBVO is 1 o'clock, that is, if there is less matching with the previous frame map point, a valid local map information may not be available.
    2. In the next positioning, if the MBVO is 1, then the first Trackwithmotionmodel tracking, and then re-positioning, in order to ensure that the location is not easily lost. However, if the motion is still too fast and the MBVO is still 1, repeat step 2 the next time. Until Trackwithmotionmodel set MBVO to 0, or reposition successfully set MBVO to 0.
4. End Processing

Here are two points more difficult to understand:

    1. Why is there a map point with an observation value less than 1?

       //clean VO matches for (int i=0; i<mcurrentframe.n; i++) {mappoint* P            MP = Mcurrentframe.mvpmappoints[i]; if (PMP) if (pmp->observations () <1) {Mcurrentframe.mvboutlier[i] = f                    Alse;                Mcurrentframe.mvpmappoints[i]=static_cast<mappoint*> (NULL); }}  

      After grooming, the local map is optimized in localmapping, the relationship between map points and keyframes is adjusted, and some observation are deleted by some map points. So it needs to be dealt with.

    2. To delete some temporary map points, where do these points come from?

       //Delete temporal mappoints for (list<mappoint*>::iterator lit = Mlptemporalpoints.beg In (), lend = Mlptemporalpoints.end (); Lit!=lend;            lit++) {mappoint* PMP = *lit;        Delete PMP; } mlptemporalpoints.clear ()  

      has a updatelastfframe function in Trackwithmotionmodel, and in pure positioning mode, some temporary map points are added according to the depth map. In order to increase the number of matching points to make the posture more accurate. So you have to delete these temporary map points from the back.

Reread Orb's tracking threading difficulties

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.