MATLAB: Specifications of checkerboard for stereo reconstruction with maximum accuracy

calibationcheckerboardComputer Vision Toolboximage processingstereo reconstruction

I have to reconstruct an object which will be placed around 1 meter to 1.5 meters away from the baseline of my stereo setup. The image captured by both cameras have high resolution (10 MP)
The accuracy with which I have to detect it's position is +/- 0.5mm, in all the three co-ordinate axes. (If you require more details, please let me know)
For these, what should the optimal specifications of my checkerboard (for calibration) be?
I only know that it should be an asymmetric board. It should be placed in the same distance range as the range where object is expected to be placed. Also, it should be oriented in all possible angles (making sure all corners are seen by both cameras)
What about:
1. Number of squares horizontally and vertically? (also, on which side should the squares be more / even?)
2. Dimension of each square on checkerboard?
3. What effect does the baseline distance have on this?
Do these parameters of the checkerboard affect my accuracy in anyway? Are there any other parameters I need to consider for calibration?
I am using the MATLAB Stereo Calibrator App.

Best Answer

Hi Sanya,
1. The number of squares is not terribly important. You want your checkerboard to be large enough to take up a significant portion of the field of view at your desired distance (1m - 1.5m). If you have fewer squares, you would need to take more images to get a sufficient number of points. The more points you have the better. To see if you have enough points, you would need to calibrate, and look at the reprojection errors, and the estimation errors. Which side is longer and which side is even does not matter at all.
2. The squares should be big enough to resolve at your distance and resolution.
3. 1.5 meters is actually a rather short distance. Your baseline should be very narrow for this, i.e. the cameras should be very close together.
Please make sure your checkerboard is as flat as it can be. Also be sure to use a lossless image format for your calibration images, like tiff or png. Definitely do not use jpeg, because compression artifacts will cause errors.
Once you calibrate, take a pair of images with your cameras, rectify them using rectifyStereoImages, create an anaglyph using stereoAnaglyph and display it using imtool. Then use the ruler widget in imtool to measure the distances between some of the corresponding points in the two images. That will give you an idea of how to set the 'DisparityRange' parameter of the disparity function.
Also be aware that if your camera1 is to the right of camera2, then the disparity will be negative. By the way, right here means as you look in the same direction as the cameras.
Another thing, next time you ask a question about this topic, please specify Computer Vision System Toolbox under "Products". This way you will be likely to get an answer much faster.