我使用RGB+depth视频生成了多点云,并希望将多点云可视化为视频或动画。
目前我正在使用Python,代码的一部分如下所示:
for i in range(1,10)
pcd = Track.create_pcd(i)
o3d.visualization.draw_geometries([pcd])
pcd_list.append(pcd)当我使用draw_geometries或draw_geometries_with_animation_callback时,它们似乎无法显示点云列表:
o3d.visualization.draw_geometries([pcd_list])或
def rotate_view(vis):
ctr = vis.get_view_control()
ctr.rotate(10.0, 0.0)
return False
o3d.visualization.draw_geometries_with_animation_callback([pcd_list],rotate_view)它给出了以下错误:
TypeError: draw_geometries():不兼容的函数参数。支持下列参数类型:
有没有例子说明如何将点云列表导出到视频中,比如设置查看器,并以0.5秒的等待键显示每个点云,然后将其保存为视频文件(.mp4/..avi)?还能得到并设置视频中点云的固定视点吗?
非常感谢!
发布于 2020-07-21 00:53:57
您可以使用Open3D 非阻塞可视化。
会是这样的
vis = o3d.visualization.Visualizer()
vis.create_window()
# geometry is the point cloud used in your animaiton
geometry = o3d.geometry.PointCloud()
vis.add_geometry(geometry)
for i in range(icp_iteration):
# now modify the points of your geometry
# you can use whatever method suits you best, this is just an example
geometry.points = pcd_list[i].points
vis.update_geometry(geometry)
vis.poll_events()
vis.update_renderer()https://stackoverflow.com/questions/62912397
复制相似问题