报错解决: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)
相关推荐
爱喝水的鱼丶1 天前
SAP-ABAP:SAP概述:数据处理的系统、应用与产品
运维·学习·sap·abap·1024程序员节
CoderJia程序员甲2 天前
GitHub 热榜项目 - 日榜(2025-11-13)
ai·开源·github·1024程序员节·ai教程
小坏讲微服务3 天前
MaxWell中基本使用原理 完整使用 (第一章)
大数据·数据库·hadoop·sqoop·1024程序员节·maxwell
liu****3 天前
18.HTTP协议(一)
linux·网络·网络协议·http·udp·1024程序员节
洛_尘3 天前
JAVA EE初阶 6: 网络编程套接字
网络·1024程序员节
2301_800256114 天前
关系数据库小测练习笔记(1)
1024程序员节
金融小师妹4 天前
基于多源政策信号解析与量化因子的“12月降息预期降温”重构及黄金敏感性分析
人工智能·深度学习·1024程序员节
GIS数据转换器4 天前
基于GIS的智慧旅游调度指挥平台
运维·人工智能·物联网·无人机·旅游·1024程序员节
南方的狮子先生5 天前
【C++】C++文件读写
java·开发语言·数据结构·c++·算法·1024程序员节
Neil今天也要学习5 天前
永磁同步电机无速度算法--基于三阶LESO的反电动势观测器
算法·1024程序员节