Items with no label
3341 討論

Does anybody know how can I retrieve depth or distance from the Intel RealSense D435?

SWong19
初學者
4,631 檢視

Hi, does anybody know what algorithm is used to retrieve the distance measured from the depth sensor in the Intel RealSense D435? I wish to utilise the depth data, specifically the distance obtained to proceed with my current project. I mean, is there any specific built-in function to get the distance of a specific object or human?

Is there any reference source code in C# that applies to my question? Thanks in advance.

0 積分
4 回應
MartyG
榮譽貢獻者 III
3,150 檢視

In the 400 Series cameras, the depth pixel value is a measurement from the parallel plane of the imagers and not the absolute range

The documentation for the .NET wrapper in SDK 2.0 has a very simple sample 'Hello World' C# script for detecting the depth of an object.

https://github.com/IntelRealSense/librealsense/tree/master/wrappers/csharp librealsense/wrappers/csharp at master · IntelRealSense/librealsense · GitHub

The SDK also has a more complex sample program called 'Measure'. This one is written in C++, though the explanations of the code will help to give a deeper understanding of how SDK 2.0 handles depth calculation.

https://github.com/IntelRealSense/librealsense/tree/master/examples/measure librealsense/examples/measure at master · IntelRealSense/librealsense · GitHub

PSnip
新貢獻者 II
3,150 檢視

Hi Marty,

To add to what you already mentioned, I think following might as well work.

For any Pixel in depth Image, we can gets x,y, z co-ordinates for that pixel using function rs2_deproject_pixel_to_point

https://github.com/IntelRealSense/librealsense/blob/5e73f7bb906a3cbec8ae43e888f182cc56c18692/include/librealsense2/rsutil.h# L46 librealsense/rsutil.h at 5e73f7bb906a3cbec8ae43e888f182cc56c18692 · IntelRealSense/librealsense · GitHub

The 3-D co-ordinate which above function returns is a physical point in space w.r.t. camera co-ordinate system. Z value is the actual Depth value. By using x & y values along with Z, one can know the actual distance of that particular point from camera.

SWong19
初學者
3,150 檢視

does that mean this is one of the ways for me to retrieve the depth data? thanks

idata
員工
3,150 檢視

Hello StevenWong1995,

 

 

We were wondering if the recommendations provided by Marty G and thePaintedSnipe were the solution that you were looking for.

 

Please, let us know if further assistance is required or if we can close this case.

 

 

Best regards.

 

 

Josh B.

 

Intel Customer Support

 

回覆