Monocular入口:
1.initialize SLAM system
ORB_SLAM2::System SLAM(argv[1],argv[2],ORB_SLAM2::System::MONOCULAR,true);
create and set pointers between threads:
mpVocabulary ---> mpKeyFrameDatabase
mpMap
mpTracker / mpLocalMapper/ mpLoopCloser
2.Track per Image
SLAM.TrackMonocular(im,tframe);
cv::Mat Tcw = mpTracker->GrabImageMonocular(im,timestamp);
2.1 转为灰度图
2.2 未初始化: mCurrentFrame = Frame(mImGray,timestamp,mpIniORBextractor,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
已初始化:mCurrentFrame = Frame(mImGray,timestamp,mpORBextractorLeft,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
构建frame,仅仅只是extractor不同,初始化需要两倍特征点
2.3 track()
2.3.1 track()中若为初始化则 MonocularInitialization();
MonocularInitialization():
若已初始化,not only Tracking:
CheckReplacedInLastFrame();
TrackReferenceKeyFrame() or TrackWithMotionModel() or Relocalization();
only Tracking:暂时不要这个
