报错解决: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)
相关推荐
数据皮皮侠AI4 天前
顶刊同款!中国地级市风灾风险与损失数据集(2000-2022)|灾害 / 环境 / 经济研究必备
大数据·人工智能·笔记·能源·1024程序员节
Fab1an5 天前
Busqueda——Hack The Box 靶机
linux·服务器·学习·1024程序员节
技术专家6 天前
Stable Diffusion系列的详细讨论 / Detailed Discussion of the Stable Diffusion Series
人工智能·python·算法·推荐算法·1024程序员节
学传打活8 天前
古代汉语是源,现代汉语是流,源与流一脉相承。
微信公众平台·1024程序员节·汉字·中华文化
学传打活13 天前
【边打字.边学昆仑正义文化】_19_星际生命的生存状况(1)
微信公众平台·1024程序员节·汉字·昆仑正义文化
unable code20 天前
[HNCTF 2022 WEEK2]ez_ssrf
网络安全·web·ctf·1024程序员节
unable code21 天前
[NISACTF 2022]easyssrf
网络安全·web·ctf·1024程序员节
unable code22 天前
BUUCTF-[第二章 web进阶]SSRF Training
网络安全·web·ctf·1024程序员节
开开心心就好23 天前
进程启动瞬间暂停工具,适合调试多开
linux·运维·安全·pdf·智能音箱·智能手表·1024程序员节
仰泳之鹅24 天前
【51单片机】第一课:单片机简介与软件安装
单片机·嵌入式硬件·51单片机·1024程序员节