How to calibrate cameras for StereoBM depth map

asked 2015-04-15 22:59:21 -0600

Cerin gravatar image

Is there any documentation or an example on how to use/calibrate OpenCV's StereoBM with two arbitrary cameras with an arbitrary B and f? There's a simple example in the tutorials that shows some minimal code, but it doesn't explain how to configure it for your own B and f, assuming a pre-calibrated setup which likely doesn't match your own setup.

I tried running the example code on two images taken from some webcams placed 2 inches apart, and it just returns a completely gray screen, which I take to mean the default StereoBM assumes a completely different calibration.

edit retag flag offensive close merge delete

Comments

I had same issue, i got some useful result after converting target mat to CV_8U. But still it wont solve problem of setting up cameras.

Sheet gravatar imageSheet ( 2015-11-19 05:33:10 -0600 )edit