Back to Open3d

Python Interface

docs/jupyter/geometry/python_interface.ipynb

0.19.01.5 KB
Original Source

Python Interface

For the C++ interface, see here.

Install Open3D Python package

For installing Open3D Python package, see here.

Install Open3D from source

For installing from source, see here.

Getting started

This tutorial shows how to import the open3d module and use it to load and inspect a point cloud.

python
import open3d as o3d
<div class="alert alert-info">

Note:

Depending on the environment, the name of the Python library may not be open3d.so. Regardless of the file name, import open3d should work.

</div>
python
sample_pcd_data = o3d.data.PCDPointCloud()
pcd = o3d.io.read_point_cloud(sample_pcd_data.path)
print(pcd)

This imports the read_point_cloud function from the open3d module. It reads a point cloud file and returns an instance of the PointCloud class. print(pcd) prints some brief information about the point cloud.

Using built-in help function

Browse Open3D

help(open3d) prints a description of the open3d module.

python
help(o3d)

Description of a class in Open3D

help(open3d.PointCloud) provides a description of the PointCloud class.

python
help(o3d.geometry.PointCloud)

Description of a function in Open3D

help(open3d.read_point_cloud) provides a description of the input arguments and return type of the read_point_cloud function.

python
help(o3d.io.read_point_cloud)