报错解决: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)
相关推荐
西幻凌云4 小时前
初始——正则表达式
c++·正则表达式·1024程序员节
启芯硬件9 小时前
电源XL6009E1的dieshot细节分析-芯片设计干货
大数据·经验分享·硬件工程·1024程序员节
一颗青果2 天前
单例模式 | 死锁
linux·服务器·单例模式·1024程序员节
yBmZlQzJ5 天前
财运到内网穿透域名解析技术机制与中立评估
运维·经验分享·docker·容器·1024程序员节
yBmZlQzJ5 天前
内网穿透工具通过端口转发实现内外网通信
运维·经验分享·docker·容器·1024程序员节
数据皮皮侠AI5 天前
数字经济政策工具变量数据(2008-2023)
大数据·数据库·人工智能·笔记·1024程序员节
网安_秋刀鱼6 天前
【java安全】shiro反序列化1(shiro550)
java·开发语言·安全·web安全·网络安全·1024程序员节
unable code8 天前
攻防世界-Misc-Wire1
网络安全·ctf·misc·1024程序员节
开开心心就好8 天前
版本转换工具,支持Win双系统零售批量版
linux·运维·服务器·pdf·散列表·零售·1024程序员节