我正在使用 Open3D 在 Python 中可视化点云。本质上,我想做的是以编程方式向点云添加另一个点,然后实时渲染它。
这就是我到目前为止所拥有的。我找不到任何解决方案。
在下面的代码中,我展示了一种可能的解决方案,但它并不有效。一旦第一个窗口关闭,就会添加点并打开一个新窗口。这不是我想要的。我希望它动态显示新点,而无需再次关闭和打开。以及创建一个新变量的事实,我认为在处理越来越大的数据集时可能会出现问题
import open3d as o3d
import numpy as np
#Create two random points
randomPoints = np.random.rand(2, 3)
pointSet = o3d.geometry.PointCloud()
pointSet.points = o3d.utility.Vector3dVector(randomPoints)
#Visualize the two random points
o3d.visualization.draw_geometries([pointSet])
#Here I want to add more points to the pointSet
#This solution does not work effective
#Create another random set
p1 = np.random.rand(3, 3)
p2 = np.concatenate((pointSet.points, p1), axis=0)
pointSet2 = o3d.geometry.PointCloud()
pointSet2.points = o3d.utility.Vector3dVector(p2)
o3d.visualization.draw_geometries([pointSet2])
有什么可能的解决方案吗?
如果没有,我可以查看哪些其他库能够实时呈现新的传入点。