View my account

Depth Units ambiguity

Comments

4 comments

  • Alexandra Ciuriuc

    Hello Keith,

     

    Thank you for your interest in the Intel RealSense D415 camera.

    The line of code below sets the DepthUnits option:
    depthSensor.Options[Option.DepthUnits].Value = .00001f; //set the Depth Units in meters

     

    Regards,

    Alexandra

     

    0
    Comment actions Permalink
  • Keith Ahern

    Thanks Alexandra, 

    I've done this in Python:

    self.depth_sensor.set_option(rs.option.depth_units, 0.0001)

    My question is, how does this affect other APIs, for example if I call depth_frame.get_distance() do I still get metres in return? or 1/10 of a meter?   Where does changing the depth unit affect values?  When I change the depth_unit my code no longer works, and its not fixed by a simple scale factor either.  Does that make sense?

    0
    Comment actions Permalink
  • Evgeni Raikhel

    Hello Keith,

    Changing the depth units automatically changes the "raw" depth data so that the `Depth_unit` X 'Raw depth raw Value' remains unchanged, i.e the value of depth_frame.get_distance(i,j) will remain approximately the same . It is the depth resolution and precision that get affected.

    As a sequence changing the depth units shall transparent to the other parts of the user's code, unless there code make (incorrect) assumptions regarding the depth units.

    Remember that raw depth is an unsigned 16-bit unit-less value that shall be interpreted only in conjunction with the actual `Depth_units` value.

     

    Note that in changing the depth units also modifies the sensor's dynamic range:

    - With default depth units (0.001m) the "theoretical" max distance is 0.001 * 2^16 ~=64m

    -Changing the depth units to 100μm (0.0001m) allows for the max  measured range ~6.4m

    0
    Comment actions Permalink
  • Keith Ahern

    Thank you, this helped me resolve it.  When I look further I can see my code is correct but the existing spatial filter in my pipeline was having a detrimental effect when I used a 0.0001m depth unit, so I think the spatial filter parameters are depth unit sensitive.

    0
    Comment actions Permalink

Please sign in to leave a comment.