Ask Your Question
0

Disparity with 32FC1?

asked 2016-03-04 04:59:19 -0600

aripod gravatar image

Hello,

I'm obtaining the disparity map (using a ros node) and I get that the encoding is 32FC1. How do I obtain the disparity for each pixel to obtain the depth in Z?

According to the formulas, I should do Z = f.b / d. f being the focal length, b the baseline and d the disparity. But for d in a pixel coordinate (u, v) from the rectified images I get four values (RGBA I guess). How do I get the real value for d from this four values?

Thanks for the help.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-11 09:07:18 -0600

Use the reprojectImageTo3D function. The Q matrix from the stereo calibration is needed (for the baseline).

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-03-04 04:59:19 -0600

Seen: 439 times

Last updated: Mar 11 '16