Hi,
I am trying to get 3d coordinates from (u,v) pixel coordinates.
Formulas
I am trying to use the formulas in this link with fx,fy,cx,cy parameters from sl.cameraParameters. But fx,fy,cx,cy comes as 0. That’s why the formulas don’t work. Is it because I am trying to open the svo file that I recorded from my Zed x camera that the data appears as 0? Or is there another problem?
I can access fx,fy,cx,cy values with the method you shared, which is perfect. But the Z value appears to me as a matrix. For this reason, X and Y also become matrices. This is the code I use for getting the Z value.
Thank you for your help, but I don’t quite understand how to use it. Can you explain in a little more detail how to calculate the Z value?https://www.stereolabs.com/docs/api/python/classpyzed_1_1sl_1_1Camera.html#a8b3b2bcdf9dd76a4c2f76514474c09f9
I tried the code in this link but it doesn’t look right. And it does not use fx fy cx cy in this code. My main goal is to detect the position of a hand-held object. I get the pixel position correctly and when I compare the position of the hand and the position of the detected object using bodies.body_list[0].keypoint[9], the position from the link comes out very different.
I am comparing the keypoint 9 and the white dot as you can see in above. But there is problem with datas.
-1.854631374627607 -1.209342655870868 2.7277729511260986 (this is from depth pixel calculation fx,fy,cx,cy ,Z,u,v)
[-1.1413424 0.66083884 -2.2877834 ](this is from direct keypoint 3d coordinates)
as you can see there is anormaly. pixel values should be very close to the 3d keypoint coordinates.