0
votes

After stereo calibration, when I run the Matlab example for stereo depth estimation (SDE), the distances are wrong: at about 2 meters, it always reports distance as less than 1m. And my 3D scene reconstruction looks cone-shaped instead of like the real scene. Disparity map is very noisy (non-smooth), but resembles the scene.

If I 'feed' the SDE script the example file instead of webcam input, it runs okay, all looks great; when I feed it from two webcams ( 'Logitech HD Pro Webcam C920' ) that's when I get the above bad results, beginning with rough disparity map.

I've tried many different calibration attempts with just a few images up to about 60, with Matlab's checkerboard pattern at different angles (never > 45) and distance to cameras about 8 to 20'. Camera lenses are 3.8175" apart always, and are mounted to top edge of laptop. Followed Matlab's recommended workflow.

What am I doing wrong in calibration?

Matlab R2015a. Laptop Windows 7 64-bit Checkerboard pattern is 37" x 27"

............JUST DISCOVERED PROBLEM: Was creating disparity map with this: disparityMap = disparity(frameLeftGray, frameRightGray); However, my camera #1 is on the right, and Matlab says default disparity range is [0 64] and for cam #1 right it should be [-128 0], but that changes the disparity map to all uniform blue.

1
do you have any estimation of the focal lens of the cameras you are using?Diego O.d.L

1 Answers

1
votes

I got it working. (1) left/right of calibration and images and detection data structures must match. (2) Use mm for checkboard square size. Inches causes malfunction, because all else is in mm.