MCPcopy Create free account
hub / github.com/UZ-SLAMLab/ORB_SLAM3 / UpdateLocalPoints

Method UpdateLocalPoints

src/Tracking.cc:3427–3454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3425}
3426
3427void Tracking::UpdateLocalPoints()
3428{
3429 mvpLocalMapPoints.clear();
3430
3431 int count_pts = 0;
3432
3433 for(vector<KeyFrame*>::const_reverse_iterator itKF=mvpLocalKeyFrames.rbegin(), itEndKF=mvpLocalKeyFrames.rend(); itKF!=itEndKF; ++itKF)
3434 {
3435 KeyFrame* pKF = *itKF;
3436 const vector<MapPoint*> vpMPs = pKF->GetMapPointMatches();
3437
3438 for(vector<MapPoint*>::const_iterator itMP=vpMPs.begin(), itEndMP=vpMPs.end(); itMP!=itEndMP; itMP++)
3439 {
3440
3441 MapPoint* pMP = *itMP;
3442 if(!pMP)
3443 continue;
3444 if(pMP->mnTrackReferenceForFrame==mCurrentFrame.mnId)
3445 continue;
3446 if(!pMP->isBad())
3447 {
3448 count_pts++;
3449 mvpLocalMapPoints.push_back(pMP);
3450 pMP->mnTrackReferenceForFrame=mCurrentFrame.mnId;
3451 }
3452 }
3453 }
3454}
3455
3456
3457void Tracking::UpdateLocalKeyFrames()

Callers

nothing calls this directly

Calls 3

GetMapPointMatchesMethod · 0.80
clearMethod · 0.45
isBadMethod · 0.45

Tested by

no test coverage detected