Ask Your Question

Stereo Calibration using sample code

asked 2018-12-09 05:35:31 -0600

Hi Guys,

I wish to calibrate a stereo setup using the sample code provided by OpenCV ( cpp-example-stereo_calib ) . I have tried the sample code for checkerboard calibration using 33 pairs of stereo images with the arguments given for width ( 10 because of 10 squares in the horizontal direction) , height ( 7 because of 7 squares in the vertical direction ), square size 32.8 ( since sqaure size is 32.8 mm) and path to xml file containing paths of stereo images. Following are the questions:

1) What is the unit for square size which needs to be fed ? 2) What is the right interpretation of "Error: too little pairs to run the calibration" ? If I change the arguments to random values, I get the same error. Please explain. 3) If the stereo setup does not have both camera planes parallel to each other and the planes are inclined to each other with angle between them 90 degrees such that there is very small overlap region, then how to calibrate the setup properly ?

Please help.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2018-12-09 06:32:47 -0600

berak gravatar image

updated 2018-12-09 07:15:14 -0600

  1. it's the size of a square in centimeters (as printed on paper). also, the image below show a 9x6 chessboard, not 10x7 !
  2. it means, that none of your image pairs were acceptable (you need at least2 valid pairs for the calibration) it needs to find all of the chessboard corners in both images there. (and again, your numbers seem to be wrong above)
  3. the cameras should be mounted parallel, not at an 90° angle.

image description.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-12-09 05:35:31 -0600

Seen: 848 times

Last updated: Dec 09 '18