This project is a tool for testing and visualizing multi-camera calibration. It was developed as part of a Google Summer of Code initiative to enhance and streamline the calibration process for multi-camera setups. By using this tool, developers can easily test calibration pipelines, visualize camera poses in 3D, and analyze error distributions.
A short demo video is available below, click on it to get a quick overview of the project:
Before you begin, ensure that you have the following:
- OpenCV repository.
- OpenCV Contrib repository (provides extra modules).
- My C++ calibration implementation (copy the necessay files from my repo into
ccalibmodule of youropencv_contribrepo). - Curated raw images are available on Kaggle, along with additional public datasets. (These images are clear, low-noise, and synchronized.)
Clone the necessary repositories to your local machine:
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.gitIntegrate Calibration Code:
Copy the required calibration source files from the ccalib implementation into the appropriate directories within the OpenCV Contrib tree.
Create a build directory within the OpenCV source folder and run CMake. Replace the placeholder paths with the actual paths on your system:
cmake \
-DOPENCV_EXTRA_MODULES_PATH=<path-to-opencv_contrib>/modules \
-DOPENCV_TEST_DATA_PATH=<path-to-opencv_extra_testdata> \
-DWITH_OPENMP=ON \
-DBUILD_EXAMPLES=ON \
-DBUILD_opencv_ccalib=ON \
-DBUILD_opencv_aruco=ON \
-DBUILD_opencv_viz=ON \
-DWITH_VTK=ON \
-DBUILD_opencv_samples=ON \
-DBUILD_opencv_python3=ON \
..Then, compile the project (for example, using make):
make -j$(nproc)After building OpenCV, compile the sample calibration code using your favorite compiler. For example, using GCC with C++17:
g++ multicam_calib.cpp -o multicam_calib \
-I<path-to-opencv_include> \
-L<path-to-opencv_lib> \
-lopencv_core -lopencv_imgcodecs -lopencv_highgui -lopencv_imgproc \
-lopencv_calib3d -lopencv_ccalib -lopencv_aruco -lopencv_viz \
-std=c++17 -Wl,-rpath,<path-to-opencv_lib>Replace <path-to-opencv_include> and <path-to-opencv_lib> with the actual directories from your OpenCV installation.
-
Dataset: Select a sample YAML configuration file from my curated dataset availabe on kaggle. This file should specify the image paths and calibration settings.
-
Update YAML File: Use the provided sample YAML configuration file from my Kaggle dataset. This YAML file specifies the image paths and calibration settings for each fiducial pattern. You can also update the YAML file to point to any additional public datasets you prefer.
Note: Due to time constraints, the fisheye implementation is not available yet. This project is in its initial stage and will be refined as development continues.
- Execute Calibration:
Run the compiled tool with the YAML file as an argument:
For example:
./multicam_calib <path-to-yaml-config>
./multicam_calib /path/to/dataset/multicam_chessboard.yaml
Once executed, the tool will:
- Display a 3D visualization window showing camera positions and orientations. See the example below (a GIF).
- Generate error histograms and plots to help you assess calibration accuracy.
To close the 3D window, press q. After reviewing the plots, press q again to save the results in the calibration_results directory.
Below is a GIF demonstrating the 3D visualization of camera positions and orientations, providing an interactive view of the calibration setup.
Below are side-by-side examples of an error histogram and a reprojection errors plot:
![]() |
![]() |
| Error Histogram | Reprojection Errors Plot |
Note: Due to time constraints, only a limited set of tasks has been implemented so far, but additional features will be added as the project progresses.



