Ask Your Question

3D scale is poor.

asked 2012-09-14 11:20:30 -0500

kazu gravatar image

I got 3D point cloud by using stereo camera and sample stereo_calib.cpp and stereo_match.cpp. And, when viewed in the point cloud gnuplot, scale is very small compared with the reality.

I used 9x6 checkerboard of square size 3.45cm. Of course, squareSize of source code, I've assigned a 3.45. As a result, RMS error=0.221828 and reprojection error=0.261209, and rectified images was good. Then, place the object to the location of the shooting distance of 100cm from the stereo camera, I got a 3D point cloud using stereo SGBM. However, average Z value of that object was 6.

Why not?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2012-09-15 15:53:56 -0500

Jacek gravatar image

updated 2012-09-15 15:57:53 -0500

The reason of your issue could be that disparity computed by SGBM is for some reason multiplied by 16.

See this excerpt from OpenCV documentation:

disp – Output disparity map. It is a 16-bit signed single-channel image of the same size as the input image. It contains disparity values scaled by 16. So, to get the floating-point disparity map, you need to divide each disp element by 16.

Distance to the camera (Z coordinate) is inversly proportional to disparity. So you can equivalently multiply Z-coodinate by 16. Taking into account this scaling coefficient you have: 6*16 = 96 which is pretty close to 100.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2012-09-14 11:20:30 -0500

Seen: 444 times

Last updated: Sep 16 '12