View my account

[D455] Generate PointCloud

Comments

3 comments

  • MartyX Grover

    Hi Nguyenduyduc14. These two instructions are part of the same method for generating a point cloud.  First map_to is used, followed by pc.calculate.  For example:

     

    pc.map_to(color_frame)  // Tell pointcloud object to map to this color frame

    points = pc.calculate(depth_frame)  //  Generate the pointcloud and texture mappings

     

    This pointcloud generation method is more accurate than aligning and then using rs2_deproject_pixel_to_point and you can obtain the XYZ coordinates of the points from the pc.calculate pointcloud's vertices like in the Python pointcloud script at the link below.

     

    https://github.com/IntelRealSense/librealsense/issues/4612#issuecomment-566864616

     

    In regard to the difference in the number of points, information about this is provided at your other question at the link below.

     

    https://support.intelrealsense.com/hc/en-us/community/posts/8469810288275

    0
    Comment actions Permalink
  • Nguyenduyduc14

    I am quite confused again.

    Is it the best process to get the most accurracy  pointcloud?
    -> Wait for frames -> postprocessing -> align -> map_to(color) -> calculate(depth). 

    Do I need align if I want to get the most accuracy pointcloud?

    0
    Comment actions Permalink
  • MartyX Grover

    Typically the map_to method of generating a pointcloud would not be used with depth-color alignment because map_to is already aligning (or mapping) depth to color, or color to depth depending on whether color or depth is in the pc.map_to brackets. 

     

    The map_to + pc.calculate method should be more accurate than using alignment, as the align process can introduce some inaccuracy into the coordinates.  It isn't a large amount of difference though in regard to the accuracy of the two methods of generating a pointcloud (map_to or alignment and then deprojection).

    0
    Comment actions Permalink

Please sign in to leave a comment.