[SLAM学习]ORB_SLAM2中的Tracking的单目Monocular问题汇总

 

[SLAM学习]ORB_SLAM2中的Tracking的单目Monocular问题汇总_第1张图片


mVelocity (速度)

mVelocity = mCurrentFrame.mTcw*LastTwc;

[SLAM学习]ORB_SLAM2中的Tracking的单目Monocular问题汇总_第2张图片

 

 

 1 Tracking初始化列表

c++ : 作用,初始化列表,后面的表达式用于初始化它的成员变量,或者基类的成员变量 
class A
{
public:
A():i(123)/////相当于给i赋值
{
}
    Tracking(System* pSys, ORBVocabulary* pVoc, FrameDrawer* pFrameDrawer, MapDrawer* pMapDrawer, Map* pMap,
             KeyFrameDatabase* pKFDB, const string &strSettingPath, const int sensor);
Tracking::Tracking(System *pSys, ORBVocabulary* pVoc, FrameDrawer *pFrameDrawer, MapDrawer *pMapDrawer, Map *pMap, KeyFrameDatabase* pKFDB, const string &strSettingPath, const int sensor):
    mState(NO_IMAGES_YET), mSensor(sensor), mbOnlyTracking(false), mbVO(false), mpORBVocabulary(pVoc),
    mpKeyFrameDB(pKFDB), mpInitializer(static_cast(NULL)), mpSystem(pSys), mpViewer(NULL),
    mpFrameDrawer(pFrameDrawer), mpMapDrawer(pMapDrawer), mpMap(pMap), mnLastRelocFrameId(0)

2 GrabImageMonocular 入口 转frame

cv::Mat GrabImageMonocular(const cv::Mat &im, const double ×tamp);

两种情况的Tracking

    if((mState==NOT_INITIALIZED || mState==NO_IMAGES_YET) && mpMap->GetMaxKFid() == 0){
        // cout << "Tracking::GrabImageMonocular : start from scratch." << endl; //从头开始
        mCurrentFrame = Frame(mImGray,timestamp,mpIniORBextractor,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
    }
    else{
        // cout << "Tracking::GrabImageMonocular : Already initialized for monocular map." << endl;
        mCurrentFrame = Frame(mImGray,timestamp,mpORBextractorLeft,mpORBVocabulary,mK,mDistCoef,mbf,mThDepth);
        // cout << "Tracking::GrabImageMonocular : New frame made." << endl;
    }
mpIniORBextractor 两倍
    if(sensor==System::MONOCULAR)
        mpIniORBextractor = new ORBextractor(2*nFeatures,fScaleFactor,nLevels,fIniThFAST,fMinThFAST);

 

    mpORBextractorLeft = new ORBextractor(nFeatures,fScaleFactor,nLevels,fIniThFAST,fMinThFAST);

3 mbOnlyTracking

    // True if local mapping is deactivated and we are performing only localization
    bool mbOnlyTracking;

[SLAM学习]ORB_SLAM2中的Tracking的单目Monocular问题汇总_第3张图片

4

你可能感兴趣的:(SLAM,视觉SLAM,位姿测量)