Search code examples
pythonpython-3.xpoint-cloudsopen3d

Pointcloud to image in open3d


I want to create image out of point cloud (.ply), using open3d. I have no problem with reading and visualizing it but can't find anything on saving it as png or jpg. My code, visualizing cloud:

cloud = open3d.read_point_cloud(path)
open3d.draw_geometries([cloud])

Solution

  • Try this

        vis = o3d.visualization.Visualizer()
        vis.create_window(visible=False) #works for me with False, on some systems needs to be true
        vis.add_geometry(your_mesh)
        vis.update_geometry(your_mesh)
        vis.poll_events()
        vis.update_renderer()
        vis.capture_screen_image(your_png_path)
        vis.destroy_window()