Does the Stereo calibration tutorial work for angled cameras?

I am following this tutorial: http://www.mathworks.es/es/help/vision/ug/stereo-vision.html to calibrate two cameras to obtain 3D images. My cameras are not parallel, they are angled approximatelly 60º and I don't know if that tutorial works with angled cameras. So far I have taken over 20 pictures and I have run the provided code but the results that I get are really bad.
This is the result that I am getting:
Do you know if that tutorial works with angled cameras?

Answers (1)

Have you looked at the plot produced by showReprojectionErrors? The mean reprojection error should ideally be less than 0.5 of a pixel. If you see image pairs that have relatively high reprojection errors, try excluding those and recalibrating.
If most image pairs have high reprjection errors, take a look at your calibration images. See if they are out of focus, or if the checkerboard is at very oblique angles. Also, make sure that the calibration images give you points in all parts of the image. If you have any of these problems, then you need to take some more calibration images.

4 Comments

Maybe the reprojection error is too big, it is slightly over 0.5. I am going to try to take better images and see what happens. I will come back and I will tell you if it works.
Wait, 0.5 is a rule of thumb, not a hard threshold. Slightly over 0.5 may still be ok. What is the resolution of your images?
Also, have you looked at the plot from showExtrinsics? Do the positions of the checkerboards make sense?
Here's another thought. Try calibrating each camera separately, using the Camera Calibrator App. Make sure you try the "Show Undistorted" button, to see if undistorting the image returns a reasonable result.
If calibrating the cameras individually works fine, but calibrating the stereo system does not, see if you can re-position the cameras. Can you tell me approximately what the distance between the cameras is, and what the distance to your object of interest is?
The resolution is 640x480. The checkerboards are detected correctly. The cameras are separated 80 millimeters to each other. And they are 95 millimeters from the object of interest.
I have tried to calibrate the cameras individually but I always get an error saying that I need more images or different images. I have tried with 20 images with the checkerboard in different angles and positions...
If you can't calibrate the cameras individually, that indicates a problem with the calibration images. Can you post them, so that I can take a look?

Sign in to comment.

Asked:

on 22 Sep 2014

Commented:

on 26 Sep 2014

Community Treasure Hunt

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

Start Hunting!