Depth from Disparity
Hello,
i have 2 images from the same calibrated camera. I could rectify the images using the following snippet:
Mat H1, H2;
stereoRectifyUncalibrated(image_points[0], image_points[1], F, image1.size(), H1, H2);
warpPerspective(image1, image1_rectified, H1, image1.size());
warpPerspective(image2, image2_rectified, H2, image2.size());
image_points[0] and image_points[1]
are the corresponding image points from image1 and image2 (calculated with SURF and then matched).
I also can calculate the disparity map with the two rectified images using StereoSGBM.
The next and last step would be to use
reprojectImageTo3D(image_disparity, XYZ, Q);
but i don't have the reprejection matrix Q.
Can someone describe me how to obtain this parameter?
I have the intrinsic camera matrix.
just to clarify:
that is, 2 images from the same camera ?
yes, it is