View my account

Depth image alignment on the D435i camera

Comments

7 comments

  • MartyG

    Hello, alignment can be performed both ways - depth to color, or color to depth.

     

    On the D435i camera model the RGB field of view is smaller than the depth field of view.  This means that when depth to color alignment is performed, the outer edges of the aligned image may be cut off. 

    0
    Comment actions Permalink
  • MartyG

    With color to depth alignment on a D435i, the outer edges are not cut off because the color field of view size resizes to match the larger depth field of view, and so the color detail is stretched to fit the depth image.

    0
    Comment actions Permalink
  • Prarthana Sigedar

    MartyG I cannot see the topic in ROS2 wrapper for color to depth alignment? Is this available for ROS2 wrappers?

    0
    Comment actions Permalink
  • Prarthana Sigedar

    MartyG I cannot see the topic in ROS2 wrapper for color to depth alignment? Is this available for ROS2 wrappers?

    0
    Comment actions Permalink
  • MartyG

    The ROS2 wrapper only supports depth to color when align_depth.enable is true.  Color to depth is not supported in the wrapper.  When align_depth.enabled is set to true, aligned topics should be published.

     

    /camera/camera/aligned_depth_to_color/camera_info
    /camera/camera/aligned_depth_to_color/image_raw
    0
    Comment actions Permalink
  • Prarthana Sigedar

    If I am not using ROS2 wrapper and using standalone pyrealsense2. How do I change it to align colour to depth and not the other way round?

    0
    Comment actions Permalink
  • MartyG

    In pyrealsense2, alignment can be performed with the align_to instruction.  The SDK has an example program called align_depth2color.py

    https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/align-depth2color.py

     

    By default it uses depth to color alignment.  You can change it to color to depth alignment simply by changing the

    align_to instruction from this:

    align_to = rs.stream.color

    To this:

    align_to = rs.stream.depth
    0
    Comment actions Permalink

Please sign in to leave a comment.