Visual odometry step by step ( ZED stereo camera )
1. Initial setting:
- Install OpenCV extra modules
- Setting nsight environment (include and lib path)
Confirm ZED Serial number (/usr/local/zed/tools/ZED Explorer)Key in ZED SN to get camera matrix and rectified images後來改成用ZED SDK得到camera matrix (每次run程式時,回傳值都有一點誤差,可能是環境溫度等等造成)- Open ZED Camera and get real-time rectified images
Reference:
2. Feature matching / Stereo matching:
- Convert ZED source images to grayscale images
- Declare an OpenCV matcher (ex: BFMatcher)
- Search match points between two images (left and right)
- Storing keypoints into vectors
- Using RANSAC method to find good stereo matching points (
findHomographyOpenCV Fundamental matrix function) - Draw and Display good stereo matching points according RANSAC_mask
Reference:
- 立体匹配算法(Stereo Matching)及其在OpenCV中的应用
- OpenCV Stereo Matching の性能比較
- Viulib
- tutorial_feature_flann_matcher.html
- SIRF / SURF / ORB + RANSAC
3.a Triangulation and display the 3D point cloud
- OpenCV function (triangulatePoints, convertPointsFromHomogeneous)
- Install VTK (Install VTK)
- Install PCL (Point Cloud Library)
- Install eigen (Install eigen)
Reference:
3.b Get object's 3D position by ZED SDK
Reference:
4. Estimate Camera pose using pnp algorithm
- Find initial object's 3D position
- Find matching point between lefe image (t-1) and left image (t) Reference: Fundamental matrix RANSAC
- Calculate camera pose respect to the initial 3D position (Always use left image)
Reference:
- https://www.learnopencv.com/head-pose-estimation-using-opencv-and-dlib/
- https://www.cnblogs.com/gaoxiang12/p/4659805.html
- https://blog.csdn.net/jay463261929/article/details/53818611
- Computing attitude(roll, pitch & yaw) from solvePnP()
ROS Library:
- viso2, https://github.com/KIT-MRT/viso2
- https://github.com/srv/fovis,https://github.com/srv/libfovis
Trajectory display:
留言
張貼留言