View my account

Comments

14 comments

  • MartyG

    There is an Intel tutorial for the Python language called 'distance_to_object' that shows how to align color and depth in a bag file.

    https://github.com/IntelRealSense/librealsense/blob/jupyter/notebooks/distance_to_object.ipynb

    0
    Comment actions Permalink
  • 1106569356

    Hi MartyG,

    I want to know whether this alignment aligns all the color and depth in the .bag file or just one frame.Matlab can align all frames and extract all color and depth images?

    0
    Comment actions Permalink
  • 1106569356

    Hi MartyG

    I don't know if I can put the aligned frameset of color and depth back in the.bag file for later processing.

    0
    Comment actions Permalink
  • MartyG

    As the example provides a readout of the distance to a detected object once color and depth has been aligned, I would think that it does it for all frames (though when capturing frames from the bag, it skips the first 5 frames to give auto-exposure time to adjust). 

    The subject of aligning depth to color in MATLAB using align.m is discussed in the link below.  Please read downwards in the comments from the point in the conversation that is linked to.

    https://github.com/IntelRealSense/librealsense/issues/2455#issuecomment-439939852

    0
    Comment actions Permalink
  • 1106569356

    Hi MartyG,

    I have two more questions.

    The first one, is the aligned color and depth aligned in the.bag?

    The second ond,Whether this ‘rs2_deproject_pixel_to_point’  function has matlab code?

     

    Thanks!

    0
    Comment actions Permalink
  • MartyG

    Once a bag file has had its color and depth frames aligned,you could save it as a .ply point cloud data file.  I think trying to re-save aligned data back into a bag file would be like trying to insert a round peg into a square hole.

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

    0
    Comment actions Permalink
  • 1106569356

    Because I don't know how to extract all the aligned color and depth frames.Or get all the color and point cloud frames.If so, I need to know how to map a point on a color image to a point cloud.

    0
    Comment actions Permalink
  • MartyG

    MATLAB has a downloadable Function that can convert a depth image to a point cloud.  Scroll down the page at the link below to the heading titled 'Depth Image to Point Cloud (MATLAB)' and click on the 'depthToCloud.m' link to launch its download in your browser.

    https://rgbd-dataset.cs.washington.edu/software.html

    0
    Comment actions Permalink
  • 1106569356

    I'm sorry, maybe you misunderstood me.I now don't know how to save the aligned color and depth frames.

    0
    Comment actions Permalink
  • MartyG

    As I said above, you should be able to save the aligned depth and color frames as a .ply format point cloud file.  I don't think you can write them back to the bag once they have been aligned and retain that alignment data in the bag.

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

    0
    Comment actions Permalink
  • 1106569356

    Ok,Thanks.I'm going to use Matlab to do this. Thank you  again.

    0
    Comment actions Permalink
  • 1106569356

    Hi MartyG,

    Can these aligned color and depth frames be saved?Because I also need color and depth frames.

    0
    Comment actions Permalink
  • MartyG

    If you are asking about saving aligned color and depth frames back to the bag, the previous answer applies

    https://support.intelrealsense.com/hc/en-us/community/posts/360033038054/comments/360007844274

    0
    Comment actions Permalink
  • 1106569356

    No, I need to save the aligned color and depth frames, but I'm not sure how to do it.But thank you. I need to get my thoughts together.

    0
    Comment actions Permalink

Please sign in to leave a comment.