<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PyLibRealsense Saving Aligned PointCloud in Items with no label</title>
    <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594472#M11525</link>
    <description>&lt;P&gt;Hi mpmpmpmp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Following up on my colleagues original post.&lt;P&gt;&amp;nbsp;&lt;/P&gt;Did you get the opportunity to try the example my colleague, Alexandra, mentioned? &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Can you also tell us what makes you think you are not getting an aligned poincloud from export_ply_example.py? Can you send some screenshots?&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Best regards, &lt;P&gt;&amp;nbsp;&lt;/P&gt;Casandra &lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Oct 2018 11:54:50 GMT</pubDate>
    <dc:creator>idata</dc:creator>
    <dc:date>2018-10-22T11:54:50Z</dc:date>
    <item>
      <title>PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594467#M11520</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I see there is an example for creating a pointcloud from color and depth frames and saving it as a .ply (export_ply_example.py), and I also see an alignment example (align_depth2color.py).&lt;/P&gt;&lt;P&gt;But, is there an example for saving an aligned pointcloud as a .ply file?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took a piece of code from export_ply_example.py (marked in red) and put it into align_depth2.&lt;A href="http://color.py"&gt;color.py&lt;/A&gt; as shown below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pc = rs.pointcloud()&lt;/P&gt;&lt;P&gt;points = rs.points()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#  Streaming loop&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;    while True:&lt;/P&gt;&lt;P&gt;        #  Get frameset of color and depth&lt;/P&gt;&lt;P&gt;        frames = pipeline.wait_for_frames()&lt;/P&gt;&lt;P&gt;        #  frames.get_depth_frame() is a 640x360 depth image&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;        #  Align the depth frame to color frame&lt;/P&gt;&lt;P&gt;        aligned_frames = align.process(frames)&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;        #  Get aligned frames&lt;/P&gt;&lt;P&gt;        aligned_depth_frame = aligned_frames.get_depth_frame() #  aligned_depth_frame is a 640x480 depth image&lt;/P&gt;&lt;P&gt;        color_frame = aligned_frames.get_color_frame()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        pc.map_to(color_frame)&lt;/P&gt;&lt;P&gt;        #  Generate the pointcloud and texture mappings&lt;/P&gt;&lt;P&gt;        points = pc.calculate(aligned_depth_frame)&lt;/P&gt;&lt;P&gt;        print("Saving to 1.ply...")&lt;/P&gt;&lt;P&gt;        points.export_to_ply("1.ply", color_frame)&lt;/P&gt;&lt;P&gt;        print("Done")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;        #  Validate that both frames are valid&lt;/P&gt;&lt;P&gt;        if not aligned_depth_frame or not color_frame:&lt;/P&gt;&lt;P&gt;            continue&lt;/P&gt;&lt;P&gt;   &lt;/P&gt;&lt;P&gt;        depth_image = np.asanyarray(aligned_depth_frame.get_data())&lt;/P&gt;&lt;P&gt;        color_image = np.asanyarray(color_frame.get_data())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, the resulting pointcloud is still not aligned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 21:13:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594467#M11520</guid>
      <dc:creator>MPark8</dc:creator>
      <dc:date>2018-10-12T21:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594468#M11521</link>
      <description>&lt;P&gt;Unless you really need to use Python scripting to do the alignment, there is a simple method for creating a color and depth alignment in the 3D point cloud mode of the RealSense Viewer, so you can then export a ply from the Viewer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  &lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 21:38:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594468#M11521</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-10-12T21:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594469#M11522</link>
      <description>&lt;P&gt;MartyG Thank you for the reply.&lt;/P&gt;&lt;P&gt;I am aware of that functionality in the RealSense Viewer, but I need do it in code, but it doesn't have to be in Python.&lt;/P&gt;&lt;P&gt;I am guessing there is some API for doing it since RealSense Viewer can do it, but I am not sure where to find that information.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Oct 2018 23:25:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594469#M11522</guid>
      <dc:creator>MPark8</dc:creator>
      <dc:date>2018-10-12T23:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594470#M11523</link>
      <description>&lt;P&gt;I searched extensively but unfortunately could not find a solution that I would be totally confident in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could take a look at the export_ply_example Python program.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/blob/development/wrappers/python/examples/export_ply_example.py"&gt;https://github.com/IntelRealSense/librealsense/blob/development/wrappers/python/examples/export_ply_example.py&lt;/A&gt; librealsense/export_ply_example.py at development · IntelRealSense/librealsense · GitHub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, I would recommend posting a request for code for an aligned point cloud on the RealSense GitHub, where the RealSense engineers and developers reside.  You can do so by going to the link below and clicking on the 'New Issue' button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/IntelRealSense/librealsense/issues"&gt;https://github.com/IntelRealSense/librealsense/issues&lt;/A&gt; Issues · IntelRealSense/librealsense · GitHub &lt;/P&gt;</description>
      <pubDate>Sat, 13 Oct 2018 07:46:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594470#M11523</guid>
      <dc:creator>MartyG</dc:creator>
      <dc:date>2018-10-13T07:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594471#M11524</link>
      <description>&lt;P&gt;Hi mpmpmpmp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;The export_ply_example.py already aligns the color and depth streams. You shouldn't have to align separately. &lt;P&gt;&amp;nbsp;&lt;/P&gt;You can also try this example:&lt;P&gt;&amp;nbsp;&lt;/P&gt; &lt;A href="https://github.com/IntelRealSense/librealsense/tree/master/examples/pointcloud"&gt;https://github.com/IntelRealSense/librealsense/tree/master/examples/pointcloud&lt;/A&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Can you also tell me what makes you think you are not getting an aligned poincloud from export_ply_example.py? Can you send some screenshots?&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Regards,&lt;P&gt;&amp;nbsp;&lt;/P&gt;Alexandra&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 09:30:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594471#M11524</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-10-16T09:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594472#M11525</link>
      <description>&lt;P&gt;Hi mpmpmpmp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Following up on my colleagues original post.&lt;P&gt;&amp;nbsp;&lt;/P&gt;Did you get the opportunity to try the example my colleague, Alexandra, mentioned? &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Can you also tell us what makes you think you are not getting an aligned poincloud from export_ply_example.py? Can you send some screenshots?&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;Best regards, &lt;P&gt;&amp;nbsp;&lt;/P&gt;Casandra &lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 11:54:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594472#M11525</guid>
      <dc:creator>idata</dc:creator>
      <dc:date>2018-10-22T11:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: PyLibRealsense Saving Aligned PointCloud</title>
      <link>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594473#M11526</link>
      <description>&lt;P&gt;I have verified that export_ply_example.py aligning the color and depth streams.&lt;/P&gt;&lt;P&gt;I must have done something wrong before.&lt;/P&gt;&lt;P&gt;I did reinstall the PyRealsense, although I am not sure if that was the issue.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Oct 2018 05:08:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Items-with-no-label/PyLibRealsense-Saving-Aligned-PointCloud/m-p/594473#M11526</guid>
      <dc:creator>MPark8</dc:creator>
      <dc:date>2018-10-23T05:08:38Z</dc:date>
    </item>
  </channel>
</rss>

