PointCloud.select#

PointCloud.select(ind: ndarray | Callable[[...], bool], invert: bool = False) PointCloud[source]#

Select points by index

Parameters:
  • ind (ndarray() or callable) – indices or lambda function

  • invert (bool, optional) – exclude points, defaults to False

Returns:

subset of point cloud

Return type:

PointCloud

Create point cloud from points with indices given by integer array ind. If invert is True then select those points not given by ind.

If ind is a callable function then it is applied to each column of the 3xN array of points and the point is included if the function returns True. For example:

pcd.select(lambda p: p[2] < 2)

will select all points with a z-coordinate less than 2.