Python - Display 3D Point Cloud

Employee picture Employee · Jun 21, 2018 · Viewed 52k times · Source

I have a .PLY file that contains a 3D Point Cloud: I want to plot it and visualize it in Python. The .PLY file contains ONLY vertex and NOT faces.

Could you indicate me a simple Python library that will take care of plotting the 3D Point Cloud?

It is important to remark that I am not interested in plotting a Mesh, but just the Point Cloud.

Answer

Employee picture Employee · Sep 7, 2018

For anybody wondering for an easy way to read and display PLY point clouds in Python I answer my own question reporting what I've found to be the best solution in my case.

Open cmd and type:

pip install open3d

This will install Open3D on your machine and you will then be able to read and display your PLY point clouds just by executing the following sample script:

import numpy as np
from open3d import *    

def main():
    cloud = read_point_cloud("cloud.ply") # Read the point cloud
    draw_geometries([cloud]) # Visualize the point cloud     

if __name__ == "__main__":
    main()