GithubHelp home page GithubHelp logo

visual-odometry's Introduction

MONOCULAR VISUAL ODOMETRY

Introduction:

Monocular visual odometry is aimed to get the estimated motion of a calibrated camera which is mounted on a vehicle. Hence it is possible to obtain the trajectory of the vehicle from the images taken from the camera. This camera(s) system coupled with other sensors like lidar and imu can give an optimal trajectory which is extremely useful in localisation and motion planning.Here we take images shot from a single camera, process them to obtain a trajectory and we compare it with a ground truth.

The algorithm was coded in python(3) with OpenCV and other libraries.

The algorithm was implemented on dataset of 150 images provided by KITTI. The results were also confirmed by applying it on other datasets.

Method (Feature Tracking):

1)Features(key points) in the first frame(reference) were identified by FAST.

2)These features were tracked in the 2nd frame(next frame) using the LKT optical flow algorithm(Lucas kanade tracking).

3)Essential matrix was obtained by given features and camera parameters and then decomposed to obtain relative translation and rotation.

4)With the relative rotation and translation point cloud(3D) of the features were obtained wrt to 1st frame by triangulation the 2D key points.

5)Now the 2nd frame was taken as the reference all previous steps (1-4) were repeated to get features in the next frame and a cloud of features of the 2nd and 3rd frame was obtained.

6)Relative scale between frames was obtained by taking the norm (mean distance ) between two clouds.

7)Now we update the rotation and translation wrt 1st frame.

8)Above steps are repeated for the whole dataset of images and we plot the translation(trajectory)wrt to 1st frame.

NOTE-Relative translation(translation wrt 1st frame) was calculated as we require global pose / ground truth for absolute translation.

Method(Feature Matching):

1)Features in the 1st and 2nd frame were identified and matched using SIFT and Brute force matching(BF) along with KNN.

2)Essential matrix was obtained by given features and camera parameters and then decomposed to obtain relative translation and rotation.

3)With the relative rotation and translation point cloud(3D) of the features were obtained wrt to 1st frame by triangulation the 2D key points.

4)Now the 2nd frame was taken as the reference and all previous steps (1-3) were repeated to get features in the next frame and a cloud of features of the 2nd and 3rd frame was obtained.

5)Relative scale between frames was obtained by taking the norm (mean distance ) between two clouds.

6)Now we update the rotation and translation wrt 1st frame.

7)Above steps are repeated for the whole dataset of images and we plot the translation(trajectory)wrt to 1st frame.

NOTE-Relative translation(translation wrt 1st frame) was calculated as we require global pose / ground truth for absolute translation.

visual-odometry's People

Contributors

karthik101200 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.