7 Replies Latest reply on Feb 10, 2017 3:15 AM by jb455

Manually converting from Depth and color pixels to XYZ coordinate in SR300

Hi

I am using SR300 Depth camera and I want to find a way to manually conver from Depth and color pixels to XYZ coordinate in mm

• 1. Re: Manually converting from Depth and color pixels to XYZ coordinate in SR300

This forum thread may be useful to you.

• 2. Re: Manually converting from Depth and color pixels to XYZ coordinate in SR300

Thank you , I already saw that post, but I am looking for a way to convert manually from pixel to the XYZ without using ready functions because I am using the measurement in my project and I should know how they did it

• 3. Re: Manually converting from Depth and color pixels to XYZ coordinate in SR300

There was an article on converting the depth of an image on a Microsoft Kinect motion camera to real world coordinates with equations.  Maybe it is possible to adapt them for RealSense.

*******

When you record a scene with the Kinect, you can choose the 'real coordinates' (x, y, z in cm) or the 'Kinect coordinates' (i, j, z), where i ranges from 0 to 640, j ranges from 0 to 480, while z is still in cm.  So we find that a unit increment in 'i' or 'j' corresponds to different 'real distances' as a function of the depth 'z'.

To convert Kinect coordinates to real coordinates you have to calibrate your device in this way:

x = (i-320)*a*z

y= (j-240)*a*z

where, in our case, a = 0.00173667

The author attached an accompanying PDF to their original post.  It is in Spanish but has a useful illustration in English.  I've attached it to this message.

1 of 1 people found this helpful
• 4. Re: Manually converting from Depth and color pixels to XYZ coordinate in SR300

Actually I hope I find something like that but for SR300 instead, because "a" depend mainly on the device, moreover, the equations themselves may be different. I saw that post and another posts they have different equ.s.  So I should find some official Doc. in order to use it in my project

Thank you so much

• 5. Re: Manually converting from Depth and color pixels to XYZ coordinate in SR300

The 'official' way of doing it (and so the only way properly documented) is by using the Projection interface. But if you want to do it yourself you can try to reverse engineer the formulae on this page (or for a simpler, less accurate, way you can use this method where QVGA_F_X/Y are the focal length and QVGA_C_X/Y are the principal point, which you get from the Calibration).