View my account

What distance does the camera show

Comments

8 comments

  • MartyG

    Hello, the depth pixel value is a measurement from the parallel plane of the camera's imagers and not the absolute range.

     

     

    0
    Comment actions Permalink
  • 7159486

    Is there any way to measure the absolute value? In your drawing, it's the R line.

    0
    Comment actions Permalink
  • 7159486

    how do we find out that distance? 

     

    0
    Comment actions Permalink
  • MartyG

    If you are writing your own program script to find the distance then you could use the RealSense SDK's get_distance() instruction to receive the distance in real-world meters.

     

    If you also measure with a tape measure from the front glass of the camera to the object then that should also provide you with the rough distance between camera and object, regardless of the method that the camera uses to calculate the distance.

     

    In addition, if you have installed the RealSense SDK with its tools and examples included in the installation then you can find a pre-made program called rs-hello-realsense that will provide the distance to an object in meters as a plain-text value with no graphics.  The program should be at the following folder locations on Windows and Linux.

     

    Windows

    C: > Program Files (x86) > Intel RealSense SDK 2.0 > Tools

    Linux

    usr/local/bin

    0
    Comment actions Permalink
  • 7159486

    Thank you! Where can I find these instructions for get_distance()

    0
    Comment actions Permalink
  • MartyG

    The C++ source code for rs-hello-realsense makes use of the get_distance() instruction.

    https://github.com/IntelRealSense/librealsense/blob/master/examples/hello-realsense/rs-hello-realsense.cpp#L29-L30

     

    For the RealSense Python wrapper the RealSense SDK provides a beginner example that uses the instruction.

    https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#streaming-using-rspipeline

    0
    Comment actions Permalink
  • 7159486

    Do I understand correctly that in order to determine the distance R (range) from your drawing, we have to use the instructions you gave above? 

    Can you help us to understand how to determine the absolute distance to the object? That is, to find the distance R (range)

    0
    Comment actions Permalink
  • MartyG

    get_distance() will give you the real-world distance measured in meters from the front glass of the camera to a coordinate on the depth image.

     

    The alternative method of finding the distance is to retrieve the raw depth value of a pixel and then convert it to real-world meters by multiplying the raw depth value by the depth unit scale of the camera, which for most RealSense 400 Series camera models is '0.001' (meters).  The link below compares the two methods (get_distance() and raw depth value x depth unit scale).

    https://github.com/IntelRealSense/librealsense/issues/7264

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.