Description • Getting Started • Calibration • Detailed Report • Results • References
Stereo Calib is a project dedicated to performing stereo camera calibration using Charuco boards, followed by rectification, disparity map generation, and depth map estimation.
- Install poetry
- Navigate to the project directory:
cd stereo-calib
- Install necessary dependencies:
poetry config virtualenvs.in-project true
poetry install
To conduct stereo camera calibration, execute the following command:
poetry run python -m examples.perform_calibration --data-path "./dataset"
This script generates rectified stereo images along with disparity and depth maps, saving the calibration results to a results folder.
To execute stereo camera calibration and estimate the distance between the camera and the image center, run the following command:
poetry run python -m examples.perform_calibration_and_estimate_distance --data-path "./dataset"
This scripts saves calibration results to results folder outputs the computed distances in millimeters to a JSON file.
To execute stereo camera calibration with overall calibration analysis, run the following command:
poetry run python -m examples.perform_calibration_with_overall_analysis --data-path "./dataset"
This script conducts post-calibration analysis, including calculating and plotting reprojection errors and root mean square (RMS) errors for both left and right camera views. Finally, it saves the calibration results to results folder and displays the analysis plots.
To execute stereo camera calibration with single image analysis, run the following command:
poetry run python -m examples.perform_calibration_with_single_image_analysis --data-path "./dataset"
This script randomly selects a stereo image pair, analyses it by plotting detected markers, calculating and plotting reprojection errors, and visualising rectified images, disparity maps, and depth maps. Finally, it saves the calibration results to results folder and displays the analysis plots.
For a comprehensive overview of the stereo calibration process, stereo calibration results, and post-calibration analysis, refer to the detailed report.
All the rectified calibration images, along with the corresponding disparity maps, depth maps, and raw depth maps for all stereo pairs in the calibration dataset, can be found in the results folder.
Additionally, the calibration results, containing camera matrices, distortion coefficients, rectification transforms, projection matrices, and disparity-to-depth mapping matrices, are stored in a JSON file here. Moreover, the distance between the camera and the center of the image for all calibration images is also saved in a separate JSON file here.
Below are some example rectified stereo-pair images, disparity maps, and depth maps:
Rectified Stereo-Pair | Disparity Map | Depth Map |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |