Rya*_*yan 8 python video save-as point-clouds open3d
我已经使用 RGB+深度视频生成了多个点云,并且希望将多个点云可视化为视频或动画。
\n目前我使用的是Python,我的部分代码如下:
\nfor i in range(1,10)\n pcd = Track.create_pcd(i)\n o3d.visualization.draw_geometries([pcd])\n pcd_list.append(pcd)\n
Run Code Online (Sandbox Code Playgroud)\n当我使用draw_geometries或draw_geometries_with_animation_callback时,它们似乎无法显示点云列表:
\no3d.visualization.draw_geometries([pcd_list])\n
Run Code Online (Sandbox Code Playgroud)\n或者
\ndef rotate_view(vis):\n ctr = vis.get_view_control()\n ctr.rotate(10.0, 0.0)\n return False\n \no3d.visualization.draw_geometries_with_animation_callback([pcd_list],rotate_view)\n
Run Code Online (Sandbox Code Playgroud)\n它给出了以下错误:
\n\n\n类型错误:draw_geometries():函数参数不兼容。支持\n以下参数类型:
\n\n
\n- (geometry_list:列表[open3d.open3d_pybind.geometry.Geometry],window_name:str = \xe2\x80\x98Open3D\xe2\x80\x99,宽度:int = 1920,高度:int = 1080,\n左:int = 50,顶部:int = 50,point_show_normal:bool = False,\ nmesh_show_wireframe:bool = False,mesh_show_back_face:bool = False)\ n->无
\n
是否有任何示例说明如何将点云列表导出到视频中,例如设置查看器,并使用 0.5 秒的等待键显示每个点云,然后另存为视频文件(.mp4/.avi)?\n和还要获取然后设置视频中点云的固定视点?
\n非常感谢!
\n您可以使用 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()
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
16693 次 |
最近记录: |