建议直接看文档,很多都代码老了,注意把代码版本调整到你使用的open3d的版本:
https://www.open3d.org/docs/release/tutorial/visualization/visualization.html
请注意open3d应该已经不支持centos了!
- 从其他格式转换成open3d的格式的文档,能支持numpy,最后面有个小例子:https://www.open3d.org/docs/release/tutorial/t_geometry/pointcloud.html
基本上就行了!
最基本的一个例子:
import open3d as o3d
import numpy as np
import torch
np_pcd=np.load(r"C:\Users\hp\Desktop\pcd_pos.pt")
pcd = o3d.t.geometry.PointCloud(np_pcd, dtype=np.float32))
print(pcd, "\n")
o3d.visualization.draw_geometries([pcd.to_legacy()],zoom=0.3412,front=[0.4257, -0.2125, -0.8795],lookat=[2.6172, 2.0475, 1.532],up=[-0.0694, -0.9768, 0.2024])