bounds#

voxel.bounds.obbox(points, initialize=True, fine_tune=True) → BoundingBox#

Compute an oriented bounding box (OBB).

Parameters:
  • points (Tensor) – Coordinate point cloud of shape (N, 3).

  • initialize (bool, optional) – Whether to initialize the rotation with PCA.

  • fine_tune (bool, optional) – Whether to fine-tune the bounds to minimize the volume.

Returns:

BoundingBox – Oriented bounding box.

voxel.bounds.obbox_pca(points) → BoundingBox#

Compute an oriented bounding box (OBB) using PCA.

Parameters:

points (Tensor) – Coordinate point cloud of shape (N, 3).

Returns:

BoundingBox – Oriented bounding box.

voxel.bounds.obbox_fine_tune(points, initial_rotation=None) → BoundingBox#

Fine-tune an oriented bounding box (OBB) to minimize the volume of the box enclosing a point cloud.

Parameters:
  • points (Tensor) – Coordinate point cloud of shape (N, 3).

  • initial_rotation (Tensor, optional) – Initial rotation matrix of shape (3, 3).

Returns:

BoundingBox – Oriented bounding box.