问题描述
我有一个.PLY文件,其中包含3D点云:我想绘制它并用Python对其进行可视化..PLY文件仅包含顶点,而不包含面.
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.
您能告诉我一个简单的Python库,该库将负责绘制3D点云吗?
重要的一点是,我对绘制网格不感兴趣,而对点云不感兴趣.
It is important to remark that I am not interested in plotting a Mesh, but just the Point Cloud.
推荐答案
对于任何想以简便方法来读取和显示Python中的PLY点云的人,我回答了我提出自己的问题,报告我发现哪种方法是我的最佳解决方案.
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.
打开cmd并输入:
pip install open3d
这将在您的计算机上安装Open3D,然后您只需执行以下示例脚本即可读取和分配PLY点云:
This will install Open3D on your machine and you will then be able to read and dispaly 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()
这篇关于Python-显示3D点云的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!