Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Getting real 3D points from disparity map

Hi, I need to get the real 3D points from the disparity map i got (after stereo calibrating and rectifying). I tried to use reprojectImageTo3D, but the coordinates i get don't make sense, even the sign of them (positive/negative). Are the points i get from the function are real coordinates in the world coordinate system i use (a chess board is attached to the photo so the coordinate system i use is according to it). This is the code i used after calculating the disparity map:

disp.convertTo(disp, CV_32F, 1.0 / 16.0); Mat xyz; reprojectImageTo3D(disp, xyz, Q, true);

Thanks, Oleg