Is their a way to get the x and y coordinates from zed.retrieve_measure(depth_map, sl.MEASURE.DEPTH)?

The problem I’m running into is that I need the xyz coordinates for a pixel in the image in cm. I’ve tried using the point cloud measure, ie with zed.retrieve_measure(point_cloud, sl.MEASURE.XYZ). While the x and y coordinates it returns are accurate enough, the z coordinate is highly inaccurate compared to using sl.MEASURE.DEPTH.

It would be helpful if anyone knows whether using sl.MEASURE.DEPTH has a way to do this, the code I’m writing is going to be used in a real time app and I’m afraid of how much using both measures would bog down the program.

Hello and thank you for reaching us out,

The Z value between these two measure should be the same. It the same internally, and X and Y values are computed from Z so if Z is not accurate, they cannot be either.
Maybe your problem lies somewhere else ?

Best regards

Antoine Lassagne
Senior Developer - ZED SDK
Stereolabs Support