Skip to content

Stereo-Calib: Calibration, rectification, and depth estimation for stereo cameras using Charuco boards.

License

Notifications You must be signed in to change notification settings

shubhamwagh/stereo-calib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Stereo Calib

Calibration for Stereo Cameras

DescriptionGetting StartedCalibrationDetailed ReportResultsReferences

Rectified Stereo-Pair Disparity Map Depth Map

Description

Stereo Calib is a project dedicated to performing stereo camera calibration using Charuco boards, followed by rectification, disparity map generation, and depth map estimation.

Getting Started

Setup

  • Install poetry
  • Navigate to the project directory: cd stereo-calib
  • Install necessary dependencies:
poetry config virtualenvs.in-project true                  
poetry install 

Calibration

Perform Calibration : Save Rectified Images, Disparity and Depth Maps

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.

Perform Calibration: Estimate Distance Between Camera And Image Centre

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.

Perform Calibration: Overall Calibration Analysis

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.

Perform Calibration: Single Image Analysis

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.

Detailed Report

For a comprehensive overview of the stereo calibration process, stereo calibration results, and post-calibration analysis, refer to the detailed report.

Results

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

References

About

Stereo-Calib: Calibration, rectification, and depth estimation for stereo cameras using Charuco boards.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages