三维重建7:Visual SLAM算法笔记
??????? VSLAM研究了幾十年,新的東西不是很多,三維重建的VSLAM方法可以用一篇文章總結(jié)一下。
??????? 此文是一個(gè)好的視覺(jué)SLAM綜述,對(duì)視覺(jué)SLAM總結(jié)比較全面,是SLAM那本書(shū)的很好的補(bǔ)充。介紹了基于濾波器的方法、基于前后端的方法、且介紹了幾個(gè)SensorFusion方法,總結(jié)比較全面。并且文中給出了代碼的下載鏈接,比較方便。
???????? 原文鏈接:Visual SLAM算法筆記
???????? 摘抄部分,如有不適,請(qǐng)聯(lián)系刪除或者移步原文鏈接
一、Visual-Inertial Odometry算法筆記
名字縮寫(xiě)太多,我有點(diǎn)凌亂了,做個(gè)區(qū)分:
DVO: TUM的基于RGBD camera的VO方法
SVO: Gatech的基于semi-direct的hybrid VO方法
DSO: TUM的direct sparse VO方法
X、Sensor Fusion筆記
????? 使用monocular camera + IMU的方案來(lái)做SLAM/Odometry,一般被稱作Visual-Inertial Odometry (VIO)或者Visual-Inertial Navigation System (VINS)。這一類paper大多出自Robotics社區(qū),主要focus在如何更好的在Visual SLAM中融合IMU數(shù)據(jù)。IMU數(shù)據(jù)不單可以幫助resolve單目的scale ambiguity,一般情況下還可以提高SLAM的精度和魯棒性。需要注意的是,想要從IMU數(shù)據(jù)獲得準(zhǔn)確的姿態(tài)沒(méi)那么容易,一般需要做sensor fusion,從經(jīng)典的complementary filter做gyroscope、accelerometer、magnetometer的融合,再到Mahony filter等更復(fù)雜的融合算法,有很多可以選擇的算法,其精度和復(fù)雜度也各不相同。現(xiàn)在的Android系統(tǒng)里一般可以直接獲得手機(jī)姿態(tài),至于其中用了哪種融合算法本人還沒(méi)有仔細(xì)研究過(guò),精度也有待考察。在Robotics社區(qū)的VIO paper中,一般是直接用原始的IMU數(shù)據(jù)或者經(jīng)過(guò)簡(jiǎn)單濾波的數(shù)據(jù),一般需要對(duì)IMU的bias進(jìn)行建模(尤其在MEMS IMU中,所謂的零飄和溫飄對(duì)精度影響很大,有些要求比較高的情況下甚至需要將其置于恒溫狀態(tài)工作)。
MSCKF (2007-2013) [14,15]
?????? 基于Kalman filter的MSCKF跟EKF-based SLAM一樣也是出自Robotics社區(qū),從MSCKF 1.0 [14]到MSCKF 2.0 [15],精度得到了不錯(cuò)的提高,據(jù)說(shuō)Google Project Tango中的SLAM算法就是用的MSCKF算法。
?????? 傳統(tǒng)的EKF-based SLAM做IMU融合時(shí),跟前面介紹的MonoSLAM類似,一般是每個(gè)時(shí)刻的state vector保存當(dāng)前的pose、velocity、以及3D map points坐標(biāo)等(IMU融合時(shí)一般還會(huì)加入IMU的bias),然后用IMU做predict step,再用image frame中觀測(cè)3D map points的觀測(cè)誤差做update step。MSCKF的motivation是,EKF的每次update step是基于3D map points在單幀frame里觀測(cè)的,如果能基于其在多幀中的觀測(cè)效果應(yīng)該會(huì)好(有點(diǎn)類似于local bundle adjustment的思想)。所以MSCKF的改進(jìn)如下: predict step跟EKF一樣,但是將update step推遲到某一個(gè)3D map point在多個(gè)frame中觀測(cè)之后進(jìn)行計(jì)算,在update之前每接收到一個(gè)frame,只是將state vector擴(kuò)充并加入當(dāng)前frame的pose estimate。這個(gè)思想基本類似于local bundle adjustment(或者sliding window smoothing),在update step時(shí),相當(dāng)于基于多次觀測(cè)同時(shí)優(yōu)化pose和3D map point。具體細(xì)節(jié)可以參考paper[15]。
OKVIS (2013-2014)[16] (code available)
?????? 相對(duì)應(yīng)于MSCKF的filter-based SLAM派系,OKVIS是keyframe-based SLAM派系做visual-inertial sensor fusion的代表。從MSCKF的思想基本可以猜出,OKVIS是將image觀測(cè)和imu觀測(cè)顯式formulate成優(yōu)化問(wèn)題,一起去優(yōu)化求解pose和3D map point。的確如此,OKVIS的優(yōu)化目標(biāo)函數(shù)包括一個(gè)reprojection error term和一個(gè)imu integration error term,其中已知的觀測(cè)數(shù)據(jù)是每?jī)蓭g的feature matching以及這兩幀之間的所有imu采樣數(shù)據(jù)的積分(注意imu采樣頻率一般高于視頻frame rate),待求的是camera pose和3D map point,優(yōu)化針對(duì)的是一個(gè)bounded window內(nèi)的frames(包括最近的幾個(gè)frames和幾個(gè)keyframes)。
?????? 需要注意的是,在這個(gè)optimization problem中,對(duì)uncertainty的建模還是蠻復(fù)雜的。首先是對(duì)imu的gyro和accelerometer的bias都需要建模,并在積分的過(guò)程中將uncertainty也積分,所以推導(dǎo)兩幀之間的imu integration error時(shí),需要用類似于Kalman filter中predict step里的uncertainty propagation方式去計(jì)算covariance。另外,imu的kinematics微分方程也是挺多數(shù)學(xué)公式,這又涉及到捷聯(lián)慣性導(dǎo)航(strapdown inertial navigation)中相關(guān)的很多知識(shí),推導(dǎo)起來(lái)不是很容易。這可以另起一個(gè)topic去學(xué)習(xí)了。
?????? OKVIS使用keyframe的motivation是,由于optimization算法速度的限制,優(yōu)化不能針對(duì)太多frames一起,所以盡量把一些信息量少的frames給marginalization掉,只留下一些keyframes之間的constraints。關(guān)于marginalization的機(jī)制也挺有趣,具體參見(jiàn)paper[16]。
ETH Zurich的ASL組另外有一篇基于EKF的VIO paper,叫ROVIO [17],也有code,具體還沒(méi)細(xì)看,聽(tīng)說(shuō)魯棒性不錯(cuò)。
IMU Preintegration (2015-2016)[18] (code available in GTSAM 4.0)
??????? 從OKVIS的算法思想中可以看出,在優(yōu)化的目標(biāo)函數(shù)中,兩個(gè)視頻幀之間的多個(gè)imu采樣數(shù)據(jù)被積分成一個(gè)constraint,這樣可以減少求解optimization的次數(shù)。然而OKVIS中的imu積分是基于前一個(gè)視頻幀的estimated pose,這樣在進(jìn)行optimization迭代求解時(shí),當(dāng)這個(gè)estimated pose發(fā)生變化時(shí),需要重新進(jìn)行imu積分。為了加速計(jì)算,這自然而然可以想到imu preintegraion的方案,也就是將imu積分得到一個(gè)不依賴于前一個(gè)視頻幀estimated pose的constraint。當(dāng)然與之而來(lái)的還有如何將uncertainty也做類似的propagation(考慮imu的bias建模),以及如何計(jì)算在optimization過(guò)程中需要的Jacobians。相關(guān)的推導(dǎo)和理論在paper [18]中有詳細(xì)的過(guò)程。在OKVIS的代碼ImuError.cpp和GTSAM 4.0的代碼ManifoldPreintegration.cpp中可以分別看到對(duì)應(yīng)的代碼。
[1]. David Nister, Oleg Naroditsky, and James Bergen.Visual Odometry. CVPR 2004.
[2]. Andrew Davison, Ian Reid, Nicholas Molton, and Olivier Stasse.MonoSLAM: Real-time single camera SLAM. TPAMI 2007.
[3]. Ethan Eade and Tom Drummond. Monocular SLAM as a Graph of Coalesced Observations. ICCV 2007.
[4]. Georg Klein and David Murray. Parallel Tracking and Mapping for Small AR Workspaces. ISMAR 2007.
[5]. Georg Klein and David Murray. Improving the Agility of Keyframe-based SLAM. ECCV 2008.
[6]. Georg Klein and David Murray. Parallel Tracking and Mapping on a Camera Phone. ISMAR 2009.
[7]. Hauke Strasdat, J.M.M. Montiel, and Andrew Davison.Visual SLAM: Why Filter?. Image and Vision Computing 2012.
[8]. Raul Mur-Artal, J. M. M. Montiel, and Juan D. Tardos.ORB-SLAM: A Versatile and Accurate Monocular SLAM System. IEEE Transactions on Robotics 2015.
[9]. Richard Newcombe, Steven Lovegrove, and Andrew Davison.DTAM: Dense Tracking and Mapping in Real-Time. ICCV 2011.
[10]. Jakob Engel, Jurgen Sturm, and Daniel Cremers.Semi-Dense Visual Odometry for a Monocular Camera. ICCV 2013.
[11]. Christian Forster, Matia Pizzoli, and Davide Scaramuzza.SVO: Fast Semi-Direct Monocular Visual Odometry. ICRA 2014.
[12]. Jakob Engel, Thomas Schops, and Daniel Cremers.LSD-SLAM: Large-Scale Direct Monocular SLAM. ECCV 2014.
[13]. Jakob Engel, Vladlen Koltun, and Daniel Cremers.Direct Sparse Odometry. In arXiv:1607.02565, 2016.
[14]. Anastasios Mourikis, Stergios Roumeliotis. A multi-state constraint Kalman filter for vision-aided inertial navigation. ICRA 2007.
[15]. Mingyang Li, Anastasios Mourikis. High-Precision, Consistent EKF-based Visual-Inertial Odometry. International Journal of Robotics Research 2013.
[16]. Stefan Leutenegger, Simon Lynen, Michael Bosse, Roland Siegwart, and Paul Timothy Furgale.Keyframe-based visual–inertial odometry using nonlinear optimization. The International Journal of Robotics Research 2014.
[17]. Michael Bloesch, Sammy Omari, Marco Hutter, and Roland Siegwart.Robust Visual Inertial Odometry Using a Direct EKF-Based Approach. IROS 2015.
[18]. Christian Forster, Luca Carlone, Frank Dellaert, and Davide Scaramuzza.On-Manifold Preintegration for Real-Time Visual-Inertial Odometry. IEEE Transactions on Robotics 2016.
[19]. George Vogiatzis, Carlos Hernandez. Video-based, Real-Time Multi View Stereo. Image and Vision Computing 2011. (Supplementary material)
總結(jié)
以上是生活随笔為你收集整理的三维重建7:Visual SLAM算法笔记的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 烟雨江湖香烛哪里买
- 下一篇: 三维重建8:点云图像的滤波方法