Ask Your Question

Stereo Rig Calibration

asked 2014-02-06 00:39:18 -0500

SpiderGears gravatar image

updated 2014-02-06 02:43:37 -0500

berak gravatar image

Hey I am trying calibrate a Stereo rig. Attached is the results i get... Results

Whats going wrong.. tried with upto 40 image pairs...

Code here

And in code i have stream to save the calibration matrices... but doesn't seem to work.
It creates just a empty file. 0 Bytes. Not able to fig out why.

Most of the code is from opencv samples.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-08-03 12:38:50 -0500

Kozuch gravatar image

updated 2014-08-03 12:41:58 -0500

I dont know if your code is correct, but I think the calibration sample code provided with OpenCV (stereo_calib.cpp) should be correct since it is being included as "official" sample. When I look at the two images (especially the left one with a kind of "circular" error) - I have an impression I got similar error too - in my case the calibration method was not able to properly detect chessboard corners in one of my images - say I had 2 x 10 images and the 5th left image was wrong, because either not all corners were visible in the image or findChessboardCorners was not able to properly detect them. I guess the calibration sample might not be intelligent enough to toss the whole image pair (where one corner detection failed) and probably the final computation is screwed because the source image data was shifted by one image.

So make sure that corners were detected in every single image. The stereo_calib.cpp code in OpenCV 2.4.8 shows the corner detection so you should be able to control the process visually.

Another reason might be you are feeding left image where right should be - so just switch sides.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-02-06 00:39:18 -0500

Seen: 421 times

Last updated: Aug 03 '14