Search code examples
pythonpoint-cloudsopen3d

Visualizing point cloud with open3d


I'm using the following code to visualize the point cloud.

import open3d as o3d
pcd = o3d.io.read_point_cloud("assets/pcd.ply")

o3d.visualization.draw_geometries([pcd],lookat=[2.6172, 2.0475, 1.532],)

Unfortunately, I'm getting the following error

Traceback (most recent call last):
  File "/home/app/pointcloud.py", line 5, in <module>
    o3d.visualization.draw_geometries([pcd],lookat=[2.6172, 2.0475, -0.4])
TypeError: draw_geometries(): incompatible function arguments. The following argument types are supported:
    1. (geometry_list: List[open3d.open3d_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

Invoked with: [geometry::PointCloud with 677248 points.]; kwargs: lookat=[2.6172, 2.0475, -0.4]

am I missing something?


Solution

  • There is no lookat parameter in the draw_geometries function. You can simply visualize without that parameter

    The deeper reason for the error is caused by the mismatched version open3D. For the lastest version, some parameters and functions have been modified.