该函数是TrackLocalMap()中的关键一步:在局部地图构建完成后,将局部地图点投影到当前帧,搜索 ORB 匹配,为后续位姿优化提供更多观测。void Tracking::SearchLocalPoints() { // Do not search map points already matched for(vectorMapPoint*::iterator vit=mCurrentFrame.mvpMapPoints.begin(), vend=mCurrentFrame.mvpMapPoints.end(); vit!=vend; vit++) { MapPoint* pMP = *vit; if(pMP) { if(pMP-isBad()) { *vit = static_castMapPoint*(NULL); } else { pMP-IncreaseVisible(); pMP-mnLastFrameSeen = mCurrentFrame.mnId; pMP-mbTrackInView = false; pMP-mbTrackInViewR = false;