How to improve stereo camera calibration?

Hi, I am working on 3D reconstruction. I am using logitech c615 web cameras fixed at distance of 5.5 cm. The distance between the cameras and checkboard patterns is approximately 80 cms. while using stereo calibration app for finding the parameters, mean projection error was 0.21 pixel. But the rectified images come as blank with some parts on the corners. When tried showing with output view as full, it gives the error as memory out... The rectified images appear as below:
</matlabcentral/answers/uploaded_files/45082/rectified%20image%20in%20app.png> The calibration images are attached hereby. (Already posted a q for the same concern.Thanks for ur help Dima . I have tried using first camera being on left of the second. and also tried with distance between the cam and target being larger. I got the result as above)
Thanks for your help in adv!!!

 Accepted Answer

Dima Lisin
Dima Lisin on 10 Feb 2016
Edited: Dima Lisin on 10 Feb 2016

Hi Priya,

To fix this problem you have to take more calibration images with the checkerboard close to the edges of the image. It would also be good to take images of the checkerboard at varying distances.

In the images you have the checkerboard is mainly in the center, so that you do not have any points close to the top and the bottom of your field of view. As a result, you do not get a good estimate of the distortion coefficients.

I tried a simple experiment. I used only the left images to calibrate the left camera separately, using the Camera Calibrator app. Then I undistorted one of the images using the undistortImage function and setting the output view to 'full'. This is what I got:

The warping you see indicates that you need to have more data points to get a better estimate of the lens distortion. And that means taking more images. Generally, this is a good way to see if you have accurate calibration. Even if you have low reprojection errors, you may have problems like this, when you do not have good coverage of the field of view.

5 Comments

<<Hi, Thanks for your help. I have tried 25 pairs of calibration images of which 3 were rejected. I took the images at varying distances from 30 to 150 cms. After deleting some of the images and recalibrating, around 80% of the image was rectified but with a 90 degree rotation. I have attached the rectified image with output view as full. The edges were not rectified. (This was the result obtained with 3 radial coef, skew and tangential distortion). The undistorted image while calibrating left images alone was displayed as full except the edges were bent. The rectified pair of images, stereoanaglyph and undistorted images with full view has been attached.
I have the following doubts:
--Why is the rectified image rotated?? (I had to give the rotated image using imrotate to find the disparity)
--While stereo calibrating images, the same set of images when being given in different order, the rectified image was blank.When i added more images to it also the rectified images were not correct. What is the significance of it? What images should be deleted in order to obtain the correct result?
<< the rectified image obtained is:
the undistorted image :
the stereoanaglyph of rectified image
Hi Priya,
can you please post your new set of calibration images? Also, what happens when you use 2 radial distortion coefficients instead of 3? Most of the time you do not need 3 coeficients.
Hi Dima,
When using 2 radial distortion coefficient the rectified image is fully black.As the calibration image file size is larger and when splitted and compressed also the total number of uploads exceeds the maximum allowed. can you please send your email id to iswarya.subburaj@gmail.com so that we can mail you the calibration images.sorry for the inconvenience.
Hi Priya,
I have replied to you by email through you profile.
Hi Dima,
I have mailed the calibration images.Thank you in advance.

Sign in to comment.

More Answers (0)

Asked:

on 10 Feb 2016

Commented:

on 23 Feb 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!