Ask Your Question

Revision history [back]

How do I calculate disparity and pointcloud

Hello. I tried different ways to calculate disparity map, but can't get a good result. my images: can be found here: my calibration :

Unfortunatelly I can't get a good point cloud, with my code :

Maybe my calibration is not good enough, or the angle between cameras is too small. If my focal length is 35 mm and pixel size 5.5 x 5.5 μm2 , so the focal length should be around 6363 and i get 6700, which means that my lens is not exactly 35mm, but still I hope that my calibration is correct. rms error is 0.9.

During the calibration I use "chessboard rectangle size" what does it influence on? It seems that my calibration is the same, if I use rectangleSize 0.032 or 32.

Do I need to dothe following code?

    Mat img1r, img2r;
    remap(img1, img1r, map11, map12, INTER_LINEAR);
    remap(img2, img2r, map21, map22, INTER_LINEAR);
    img1 = img1r;
    img2 = img2r;

It seems that it kills all the disparity.

Do I need to normalize the disparity map?

How does stereoRectify influence my pre calibrated system? was looking at this problem, but still can't get a good point cloud.