This repository contains the source code of the Modular Optical Tool Tracking (MOTT) Framework, a modular and extensible software framework for optical tool tracking and pose estimation. The framework is designed to be easily extensible and customizable, allowing researchers to benchmark and compare different tracking algorithms in a controlled environment.
Key Features:
- Modular architecture for easy extension
- Built with modern C++23
- OpenCV integration for advanced image processing
- Cross-platform support (Windows, Linux)
- Comprehensive benchmarking capabilities
- Sample modules for common tracking tasks
- Alessandro Contenti - Department of Production and Management Engineering, Politecnico di Torino, Turin, Italy.
- Federico Salerno - Department of Production and Management Engineering, Politecnico di Torino, Turin, Italy.
The project is organized in the following directories:
framework
: contains the framework source codesamples
: contains example modules and a test application to demonstrate the usage of the framework
Each directory contains a CMakeLists.txt
file to build the corresponding part of the project.
A CMakeLists.txt
file in the root directory is provided to build the entire project.
- CMake 3.25 or higher
- A C++23 compliant compiler (e.g. MSVC 19.30, Clang 17+)
- OpenCV 4.10.0
- Spinnaker SDK (Windows only, optional, used in samples)
- Download the OpenCV installer executable (https://opencv.org/releases/)
- Install OpenCV to a directory of your choice
- Clone this repository in a directory of your choice
- Create a build directory:
mkdir build && cd build
- Configure CMake setting the OpenCV directory:
cmake -DOpenCV_DIR=<path_to_opencv>\build -S ..
- Build the project:
7BA3cmake --build . --config Release
- Build OpenCV from source (https://docs.opencv.org/4.10.0/d7/d9f/tutorial_linux_install.html)
- Clone this repository in a directory of your choice
- Create a build directory:
mkdir build && cd build
- Use Clang 17+ as compiler with its C++ standard library:
export CC=clang-17 CXX=clang++-17
- Configure CMake setting the OpenCV directory and the C++ standard library to libc++:
cmake -DOpenCV_DIR=<path_to_opencv>/build -DCXX_FLAGS="-stdlib=libc++" -S ..
- Build the project:
cmake --build . --config Release
To avoid manually configuring your Linux environment, you can use the provided
Dockerfile
located in thebuild-tools
directory to create a Docker image containing all required dependencies. You can then use this image to build the project for Linux systems in an isolated and reproducible environment.
The test application MOTTSampleApp
demonstrates the usage of the framework with a simple example.
Try editing the samples/main.cpp
file to experiment with different modules and configurations.
You can run the test application by executing the following command from the build directory:
./samples/MOTTSampleApp <pipeline_id>
To use the framework in your own project, you need to link against the MOTTFramework
shared library (
MOTTFramework.dll
on Windows, libMOTTFramework.so
on Linux) and include the framework/include
directory.
If you are using CMake, you can link against the MOTT::Framework
CMake target:
target_link_libraries(MyApp MOTT::Framework)
This project is licensed under the MIT License — see the LICENSE file for details.
Copyright © 2025 Alessandro Contenti, Federico Salerno
@software{MOTT_2025,
author = {Contenti, Alessandro and Salerno, Federico},
title = {{MOTT: Modular Optical Tool Tracking Framework enabling Efficient Benchmarking}},
url = {https://github.com/tooltip-optical-tracking/mott-framework},
version = {1.0.0}
}