Large error in sparse 3D point cloud

10 views (last 30 days)
Luca
Luca on 12 Nov 2014
Edited: Luca on 18 Nov 2015
I am working on sparse reconstruction using a calibrated stereo pair. This is the approach I have taken step by step (thanks to Dima):
1- I Calibrated my stereo cameras using the Stereo Camera Calibrator app.
2- I Took a pair of stereo images and Undistorted each image.
3- I Detect, extract, and match point features.
4- I Use the triangulate function to get 3D coordinates of the matched points by passing the stereoParametes object into triangulate. The resulting 3D coordinates are with respect to the optical center of camera 1 and it is in millimeters.
The problem is that the point clouds seems to be warped and curved towards the edges of the image. at first it seemed like a barrel distortion of the lenses to me. so I recalibrated the bumblebee XB3 cameras using MATLAB camera calibrator app. but this time I used 3 radial distortion coefficients and also included tangential and skew parameters. but the results are the same. I also tried Caltech's camera calibration toolbox but it had the same results as MATLAB. also another problem is that the Z values in the point cloud are all negative but I am thinking that might be coming from the fact that I am using right camera as camera 1 and left camera as camera 2 as oppose to what MATLAB's coordinate system is in the link attached.
I have attached couple of pictures of 3D point cloud from both sparse and dense 3D reconstruction. I am not interetsed in Dense 3D but just wanted to do it to see if the problem still exist which it does. I believe that means the main problem is with the images and camera calibration rather than algorithms.
Now my questions are:
1- What is the main reason/reasons for having warped/curved 3D point clouds? is it camera calibration only or other steps may introduce error as well? how can I check on that?
2- Can you suggest another camera calibration toolbox besides MATLAB's and Caltech's? maybe one that is more suitable for radial distortions?
Thanks

Accepted Answer

Dima Lisin
Dima Lisin on 19 Nov 2014
Edited: Dima Lisin on 19 Nov 2014
Hi Luca,
Thanks for your kind words.
You are correct about the negative values. If camera 1 is on the right, then that is what you would get.
As for the curving of the point cloud, that is harder to diagnose. I have some questions for you. How many image pairs did you use for calibration? What kind of reprojection errors did you get? What is the resolution of your camera? When you undistorted the images, did they look reasonable to your eyes? Or was there still some distortion present?
What I am getting at is that you may need to re-calibrate using more images with the checkerboard close to the edges of the image, to get a better estimate of the distortion coefficients.
Another question: what 'OutputView' did you use for the undistortImage? And if you used 'full' or 'valid', did you remember to adjust your points for the shift of the origin?
By the way, next time you have a question on this topic, please specify "Computer Vision System Toolbox" under "Products". This way you will probably get an answer more quickly.
  11 Comments
Luca
Luca on 15 Dec 2014
Hi Dima,
I did some research and apparently Bumblebee cameras are known better to be calibrated with 5 or 6 radial distortion coefficients. MATLAB CV toolbox only has 3 radial coefficients. Do you know if I can change the code to get 6 coefficients? If not, do you know of any other camera calibration toolbox that has that option? I know Caltech and OpenCV has 3 coefficients as well. I think that is the main reason causing warped point clouds since my Dense reconstruction point clouds are warped too and the only thing these two methods have in common are the images and calibration.
Dima Lisin
Dima Lisin on 16 Dec 2014
This sounds like a different distortion model. Typically you have 3 radial distortion coefficients and, optionally, 2 tangential distortion coefficients.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!