Skip to content

C++ Stereo Visual Odometry repository for experimenting with concepts in compute vision.

Notifications You must be signed in to change notification settings

FilipposSot/stereo-vo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stereo-vo

C++ Stereo Visual Odometry repository for experimenting with concepts in compute vision.

Objective

A simple stereo visual odometry pipeline is implemented and tested on the KITTI visual odometry dataset.

Method

Here we outline the high level visual odometry strategy.

This is a summary of the calculations performed for each new pair of left and right image.

  1. Add new tracking points if the tracked points from the last step are lower than a threshold. FAST features are detected.
  2. Use a circular matching scheme to match features from left and right and also track them from the previous to current timestep.
  3. Triangulate the tracked features based on stereo pairs.
  4. The relative pose between times is calculated. The OpenCV PnP with RANSAC is utilized.
  5. Finally, the robot pose is calculated based on the previous pose and calulated odometry.

Installation

Here is a guide to installing the repository. This was tested with Ubuntu 18.04

OpenCV

This installation instruction is adapted from the OpenCV instructions. Tested with OpenCV version 4.5.3.

Install minimal prerequisites

sudo apt update && sudo apt install -y cmake g++ wget unzip

Download and unpack sources

$ wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip
wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/master.zip
unzip opencv.zip
unzip opencv_contrib.zip

Create build directory and switch into it:

mkdir -p build && cd build

Configure:

cmake -DOPENCV_EXTRA_MODULES_PATH= <opencv_contrib>/modules ../opencv-master

Build:

make -j5

KITTI dataset

To run the included test download the KITTI visual odometry dataset following the instructions on the link and place the dataset in a desired location.

Installation

Currently one needs to manually set the location of the datasets in the source code: edit the path at lines 68 and 93. Then one can build the project using the following commands starting at the stereo-vo/ path:

mkdir build && cd build
cmake ..
make

Demo

To run the demo simply run the executable generated in build:

./vo

Sample results

About

C++ Stereo Visual Odometry repository for experimenting with concepts in compute vision.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published