reprojectImageTo3D components mean?

asked 2018-10-29 04:32:01 -0600

hotteock gravatar image

Hello.

I'm working stereo vision.

I'm using 2 webcams. Also, I use stereoRectify(), now I have Q matrix(disparity map to depth).

Then, I use reprojectImageTo3D(). I can get 3 chenels matrix.(From now, this matrix = T)

In the guide pages of reprojectImageTo3D said, " That is, for each pixel (x,y) and the corresponding disparity d=disparity(x,y) "

As I understood, It means that if there is a [960, 720] image, T[100,200,2] means T(100,200)'s depth.

But, I print that values, I think it is a wrong supposition...

I don't understand T[x,y,0], T[x,y,1], T[x,y,2] mean...

plz help me.

ps. My ultimate goal is to seek depth(distance).

edit retag flag offensive close merge delete

Comments

see docs , the 3rd component is (scaled) Z, not disparity

berak gravatar imageberak ( 2018-10-29 04:55:52 -0600 )edit

In your docs, Each element of _3dImage(x,y) contains 3D coordinates of the point (x,y) computed from the disparity map. 3d-Image's Z componet doesn't mean depth?? I understand... thank you!

hotteock gravatar imagehotteock ( 2018-10-29 05:00:34 -0600 )edit

So, if I want to get the real depth, reprojectImageTo3D() will not help my project. Right??

hotteock gravatar imagehotteock ( 2018-10-29 05:02:03 -0600 )edit

distance = f / disparity.

(reprojectImageTo3D is more for a 3d point cloud visualization)

berak gravatar imageberak ( 2018-10-29 05:09:38 -0600 )edit