Skip to content

nihalsuri/fast-visual-odometry-rgbd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast Visual Odometry on TUM-RGBD Dataset

Table of Contents

Developers

  • Maximilian Pries — maxwell6q
  • Bjørn Magnus Myrhaug — BjornMagnusM
  • Nihal Suri — nihalsuri

Prerequisites

This project requires OpenCV 4 (the CMake configuration expects the opencv4 layout). The project was developed and tested with OpenCV 4.x — we recommend OpenCV 4.5 or newer. It also depends on Eigen3 and requires CMake >= 3.10 and a C++20-capable compiler.

If you have a custom OpenCV installation, you can either set OpenCV_DIR when configuring CMake or enable the USE_LOCAL_OPENCV option in CMakeLists.txt and point OpenCV_DIR to your local OpenCV cmake folder.

Windows (recommended: vcpkg)

  1. Install vcpkg (if not installed):
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
  1. Install OpenCV and Eigen via vcpkg:
.\vcpkg\vcpkg.exe install opencv4:x64-windows eigen3:x64-windows
  1. Configure CMake to use the vcpkg toolchain (example from project root — adjust the path):
cmake -S . -B build -DCMAKE_TOOLCHAIN_FILE=C:/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
cmake --build build

Alternative (prebuilt OpenCV on Windows): download a prebuilt OpenCV package, extract it, and set OpenCV_DIR to the folder containing OpenCVConfig.cmake. Example:

cmake -S . -B build -DOpenCV_DIR="C:/path/to/opencv/build"
cmake --build build

Ubuntu / Debian

sudo apt update
sudo apt install -y libopencv-dev libeigen3-dev build-essential cmake

If you need a newer OpenCV than provided by your distribution, build OpenCV from source and set OpenCV_DIR to the build directory when running CMake.

Notes

  • The top-level CMakeLists.txt provides an option USE_LOCAL_OPENCV for pointing to a custom OpenCV installation.
  • The project uses C++20; ensure your compiler supports it.

Build Instructions

# Create the build directory in the root of the project 
mkdir build
cd build

# Configure the project using CMake
cmake ..

# Compile the project
make

# Run the executable
./VisualOdometry_Final

The above instructions will create a /results directory.

Code Design and Style Guide

All contributors swear to follow these points with the utmost care:

  • No usage of GLOBAL VARIABLES!
  • Final project musn't have binary files included
  • Usage of a single CMakeLists.txt with more add_executable commands
  • Compile the code, and make sure it runs bug free before pushing
  • Include guards to be added in Header file
  • A header file musn't contain function definitions, only declerations!
  • Never #include a .cpp file
  • Never add absolute paths in code
  • Always check command-line arguments, before processing them, use std::cerr for debugging purposes
  • Define GUI names as const variables
  • Don't mix more than one activity in a single function, for example maxfilter should only apply the filter, not visualize it as well
  • Pass by reference or pointer to be used in functions, for example const cv::Mat& src
  • For the sake of clarity:

About

Robust feature-based visual odometry for localization purposes performed on the TUM RGB-D dataset

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors