This is the repository for the project - Camera pose tracking using visual odometry. In this project, camera pose of a camera mounted on a car was tracked using visual odometry. Features extraction is done using SIFT, then outlier rejection is done using RANSAC. Then we derive the fundamental matrix, essential matrix, and camera pose from it. This pose is then plotted to obtain the trajectory.
---------- Our Implementation ------------------------------------- Opencv Implementation -----------
- Python3
- Numpy
- cv2
- math
- glob
- matplotlib
- Clone this repo or extract the "nalindas_proj_5.zip" file.
- Navigate to the folder "Code"
- Inside the python script -
DataPreprocess.py, you need to specify the appropriate original dataset path in thefile_pathvariable. Next, you need to specify the appropriate camera model parameters path in thecamera_pathvariable. Finally, you need to specify the path where you want the processed undistorted images to be saved in thewrite_pathvariable. - Inside the python script -
main.py, you need to specify the processed undistorted dataset path which you had specified inDataPreprocess.pyin thepathvariable. Next, you need to specify the appropriate camera model parameters path in thecamera_pathvariable. Finally, you need to specify the path where you want the camera pose plot images to be saved in thesave_pathvariable. - In the terminal, run the command
python main.pyto run our implementation. Run the commandpython builtin_main.pyto run the opencv implementation. (You need to specify the appropriate original dataset path in theIMAGES_PATHvariable. Finally, you need to specify the path where you want the camera pose plot images to be saved in theMODELS_PATHvariable.)


