Python将numpy(.npy文件)存储为.ply文件

  • Post author:
  • Post category:python


Python将numpy(.npy文件)存储为.ply文件



安装Open3D

pip install open3d



From NumPy to Ply

# Pass xyz to Open3D.o3d.geometry.PointCloud and visualize
pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(xyz)
o3d.io.write_point_cloud("../../TestData/sync.ply", pcd)

其中xyz即为存储点云xyz坐标的numpy,

维度为(N,3)

,N为点云的点数,3为xyz坐标。



Open3D文档


http://www.open3d.org/docs/0.9.0/tutorial/Basic/working_with_numpy.html