The PointCloud object#

The PointCloud class is essential for all point cloud operations and processing within this Toolbox. The class encapsulates a NumPy array that contains the point coordinates and optionally colors as a 3D array respectively. An PointCloud instance has many methods that perform useful operations on a point cloud and wrap low-level operations performed using NumPy or Open3d.

class PointCloud(arg, depth_scale=1.0, **kwargs)[source]#
__init__(arg, depth_scale=1.0, **kwargs)[source]#

Create new point cloud object

Parameters:
  • arg (o3d.geometry.PointCloud, PointCloud, ndarray(3,N)) – point cloud data as an Open3D or MVTB PointCloud object, 3xN array of points.

  • depth_scale (float, optional) – depth scale factor, defaults to 1.0

Raises:
  • RuntimeError – PointCloud class requires Open3D to be installed: pip install open3d

  • ValueError – bad arguments

This object wraps an Open3D open3d.geometry.PointCloud object. It can be created from:

  • an Open3D point cloud object

  • a 3xN array of point coordinates

  • a depth image as a 1-plane Image instance

  • an RGBD image as a 4-plane Image instance

  • a tuple of two images (RGB, D) as 3-plane and 1-plane Image instances

Warning

Open3D must be installed.

The wrapped Open3D open3d.geometry.PointCloud object has many methods and properties but rather than writing individual wrappers the __getattr__ picks up these references and invokes them on the underlying Open3D object. Any returned Open3D point cloud objects are converted to a PointCloud instance.

Seealso:

__getattr__ open3d.geometry.PointCloud Image CentralCamera

Informational#

__str__

Concise string representation of point cloud parameters

__repr__

Return repr(self).

__len__

Number of points

Access to point cloud data#

pcd

points

Get points as array

colors

Get point color data as array

Point cloud i/o#

Read

Create point cloud from file

write

Write point cloud to file

disp

Display point cloud using Open3D

Point cloud operations#

copy

Copy point cloud

transform

Transform point cloud

downsample_voxel

Downsample point cloud by voxelization

downsample_random

Downsample point cloud by random selection

voxel_grid

Voxelize point cloud

normals

Get point normal data as array

remove_outlier

Remove point cloud outliers

segment_plane

select

Select points by index

paint

Colorize point cloud

ICP

Register point cloud using ICP

__getattr__

Access Open3D PointCloud methods and attributes

Overloaded operators#

__rmul__

Overloaded * operator to transform points

__imul__

Overloaded *= operator to transform points

__add__

Overloaded the + operator to concatenate point clouds