Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new stereo matching validator for multiple camera calibration #678

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HViktorTsoi
Copy link
Contributor

@HViktorTsoi HViktorTsoi commented Mar 30, 2024

This PR add a new stereo matching validator to validate and visualize the result of multiple camera calibration. It uses the calibration result (the yaml file) from the last kalibr_calibrate_cameras step, undistorts and recitifies the images, and then run a stereo matcher to calculate the disparity map. No Calibration Target is Required in This Validator.

The stereo disparity map offers an intuitive, direct and comprehensive way to quickly visualize the calibration result. For example, a successful calibration may yield the following disparity results:

(with opencv sgbm stereo matcher)
Screenshot from 2024-03-31 02-04-09

(with opencv bm stereo matcher)
Screenshot from 2024-03-31 02-00-58
The depth of the ground plane and object surface is uniform and smooth.

While a bad calibration result leads to failed stereo matching (because of poor rectification) , resulting in a disparity map looks like this
Screenshot from 2024-03-31 02-03-17
Note there are lots of speckles and the ground plane is missing.

Usage:

python kalibr_camera_validator_stereo_match --cam ${path-to-camchain.yaml} --matcher bm --scale 2

or

python kalibr_camera_validator_stereo_match --cam ${path-to-camchain.yaml} --matcher sgbm --scale 2

the --matcher option selects the stereo matching algorithm (bm or sgbm). The --scale option determines how many times we downsample the image to speed up stereo matching .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant