Items with no label
3335 Discussions

Point Clould Question ZR300

AJina
Beginner
1,529 Views

Hello I'm using the ZR300. I'm trying to a develop a program where you can click on a pixel in stream from the zr300(color/ir) and then get the x, y, z in real world coordinates.

Using the tutorial cpp-pointclould. I want to get a specific pixel and find it's coordinates in x,y,z in meters. These two lines I think can help.

rs::float2 depth_pixel = {(float)dx, (float)dy};

rs::float3 depth_point = depth_intrin.deproject(depth_pixel, depth_in_meters);

Can I just replace the dx and dy with a pixel location on the ir or color image? Is it possible to get the x y z from that pixel by plugging in it's location into that dx, dy. Then read out the real world coordinates with depth_point.x/y/z?

Thanks,

Akash Jinandra

0 Kudos
1 Solution
idata
Employee
294 Views

Hi Akash,

 

 

Thanks for your interest in the Intel RealSense Technology.

 

 

It seems that the "deprojec" API is now obsolete and has been replaced with rs_deproject_pixel_to_point. I would like to share this document that may help you with your implementation: https://github.com/IntelRealSense/librealsense/blob/f482fc3a9bb13d3ea09a567294131073877087ee/doc/projection.md https://github.com/IntelRealSense/librealsense/blob/f482fc3a9bb13d3ea09a567294131073877087ee/doc/projection.md.

 

 

Hope you find this information useful.

 

 

Kind Regards,

 

-Yermi A.

 

View solution in original post

0 Kudos
3 Replies
idata
Employee
295 Views

Hi Akash,

 

 

Thanks for your interest in the Intel RealSense Technology.

 

 

It seems that the "deprojec" API is now obsolete and has been replaced with rs_deproject_pixel_to_point. I would like to share this document that may help you with your implementation: https://github.com/IntelRealSense/librealsense/blob/f482fc3a9bb13d3ea09a567294131073877087ee/doc/projection.md https://github.com/IntelRealSense/librealsense/blob/f482fc3a9bb13d3ea09a567294131073877087ee/doc/projection.md.

 

 

Hope you find this information useful.

 

 

Kind Regards,

 

-Yermi A.

 

0 Kudos
AJina
Beginner
294 Views

Hi Yermi,

I was wondering if there is any example code using the rs_deproject_pixel_to_point? The API gives some hints, but unless I see it in action, I'm not sure how it actually could be implemented

0 Kudos
Reply