Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

for a stereo cam, you would use stereoRectify() to obtain R,T and Q mat's, then use block-matchhing to get the disparity.

you case ofc. is different, since you already got a depth image. you might try to construct Q from img size and focal length :

Q = np.float32([[1, 0, 0, -0.5*w],
                [0,-1, 0,  0.5*h], # turn points 180 deg around x-axis,
                [0, 0, 0,     -f], # so that y-axis looks up
                [0, 0, 1,      0]])