重定位 | VINS-Mono 論文公式推導與代碼解析分講
這是我們 SLAM 組同事高洪臣寫的文章,感謝分享??????~
4. 重定位
4.1 Loop Detection
Vins-Mono 利用詞袋 DBoW2 做 Keyframe Database 的構建和查詢。在建立閉環檢測的資料庫時,關鍵幀的 Features 包括兩部分:VIO 部分的 200 個強角點 和 500個 Fast 角點,然後描述子使用 BRIEF (因為旋轉可觀,匹配過程中對旋轉有一定的適應性,所以不用使用ORB)。
Describe features by BRIEF
- Features that we use in the VIO (200, not enough for loop detection)
- Extract new FAST features (500, only use for loop detection)
Query Bag-of-Word (DBoW2)
- Return loop candidates
4.2 Feature Retrieval
在閉環檢測成功之後,會得到迴環候選幀,所以要在已知位姿的迴環候選幀和滑窗內的匹配幀通過 BRIEF 描述子匹配,然後把迴環幀加入到滑窗的優化當中,這時整個滑窗的狀態量的維度是不發生變化的,因為迴環幀的位姿是固定的。
- Try to retrieve matches for features (200) that are used in the VIO
- BRIEF descriptor match
Geometric check
- 2D-2D: fundamental matrix test with RANSAC
- 3D-3D: PnP test with RANSAC
- At least 30 inliers