Wrong distance estimation in MATLAB from stereo images generated in Blender

61 Views Asked by At

I am trying to simulate a stereo camera in Blender and to measure the distance, but I am having some issues with measuring the distance of the cameras from the checkerboard pattern.

In Blender, I set the cameras resolution to 640 x 480 px, the baseline to 20 cm, and I am using the parameters preset shown below. The maximum distance between the cameras and the pattern, in Blender, is ~20 m.

enter image description here

I have taken several synthetic pairs of pictures, and I have been able to import in the MATLAB stereo camera calibrator eight pairs. The result of the calibration is shown below. enter image description here

According to the obtained results, the distance measured by the cameras when the object is ~20 m away (Blender ground truth) is ~900 m, and I can't understand why. Moreover, the translation vector of the second camera relative to the first camera is t = [-20.0160512658773, -0.118042169030331, -328.082851181787], therefore the baseline is correctly measured, but there is something off with the z.

What am I doing wrong?

1

There are 1 best solutions below

2
Francesco Callari On

You probably entered a wrong square size for the points of the checkerboard.