报错解决:opene3d draw_geometries(): incompatible function arguments.

1. 报错信息

复制代码
o3d.visualization.draw_geometries(target_pcd)
TypeError: draw_geometries(): incompatible function arguments. The following argument types are supported:
    1. (geometry_list: List[open3d.cpu.pybind.geometry.Geometry], window_name: str = 'Open3D', width: int = 1920, height: int = 1080, left: int = 50, top: int = 50, point_show_normal: bool = False, mesh_show_wireframe: bool = False, mesh_show_back_face: bool = False) -> None
    2. (geometry_list: List[open3d.cpu.pybind.geometry.Geometry], window_name: str = 'Open3D', width: int = 1920, height: int = 1080, left: int = 50, top: int = 50, point_show_normal: bool = False, mesh_show_wireframe: bool = False, mesh_show_back_face: bool = False, lookat: numpy.ndarray[numpy.float64[3, 1]], up: numpy.ndarray[numpy.float64[3, 1]], front: numpy.ndarray[numpy.float64[3, 1]], zoom: float) -> None

Invoked with: PointCloud with 210612 points.

2. 报错问题解决

实际上就是少了个括号,o3d.visualization.draw_geometries([target_pcd])

确保 target_pcd 是一个 PointCloud 实例,然后将其作为一个列表的元素传递给 draw_geometries() 函数。这样,函数就能正确地识别参数并绘制点云。

此外,根据搜索结果,draw_geometries() 函数有两种重载形式,您可以根据需要选择使用哪种形式。第一种形式允许您指定窗口名称、宽度、高度、左上角位置、是否显示点法线、是否显示线框和背面网格等参数。第二种形式除了上述参数外,还允许您指定相机的视角参数,如 lookat、up、front 和 zoom。

复制代码
o3d.visualization.draw_geometries(target_pcd)
相关推荐
unable code1 小时前
磁盘取证-[第十章][10.1.2 磁盘取证方法]磁盘取证1
网络安全·ctf·misc·1024程序员节·内存取证
开开心心就好1 天前
免费抽奖工具支持批量导入+自定义主题
linux·运维·服务器·macos·pdf·phpstorm·1024程序员节
开开心心就好5 天前
卸载工具清理残留,检测垃圾颜色标识状态
linux·运维·服务器·python·安全·tornado·1024程序员节
子燕若水6 天前
Facebook reels 运营指南
1024程序员节
尘觉9 天前
创作 1024 天|把热爱写成长期主义
数据库·1024程序员节
写点什么呢10 天前
Word使用记录
word·1024程序员节
开开心心就好10 天前
内存清理工具点击清理,自动间隔自启
linux·运维·服务器·安全·硬件架构·材料工程·1024程序员节
开开心心就好11 天前
内存清理工具开源免费,自动优化清理项
linux·运维·服务器·python·django·pdf·1024程序员节
张萌杰14 天前
深度学习的基础知识(常见名词解释)
人工智能·深度学习·机器学习·1024程序员节
开开心心就好15 天前
免费无广告卸载工具,轻便安全适配全用户
linux·运维·服务器·网络·安全·启发式算法·1024程序员节