open3d.geometry.OrientedBoundingBox

class open3d.geometry.OrientedBoundingBox

Class that defines an oriented box that can be computed from 3D geometries.

class Type

Enum class for Geometry types.

HalfEdgeTriangleMesh = <Type.HalfEdgeTriangleMesh: 7>
Image = <Type.Image: 8>
LineSet = <Type.LineSet: 4>
PointCloud = <Type.PointCloud: 1>
RGBDImage = <Type.RGBDImage: 9>
TetraMesh = <Type.TetraMesh: 10>
TriangleMesh = <Type.TriangleMesh: 6>
Unspecified = <Type.Unspecified: 0>
VoxelGrid = <Type.VoxelGrid: 2>
property name
property value
__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: open3d.geometry.OrientedBoundingBox) -> None

Default constructor

  1. __init__(self: open3d.geometry.OrientedBoundingBox, arg0: open3d.geometry.OrientedBoundingBox) -> None

Copy constructor

  1. __init__(self: open3d.geometry.OrientedBoundingBox, center: numpy.ndarray[numpy.float64[3, 1]], R: numpy.ndarray[numpy.float64[3, 3]], extent: numpy.ndarray[numpy.float64[3, 1]]) -> None

Create OrientedBoudingBox from center, rotation R and extent in x, y and z direction

clear(self: open3d.geometry.Geometry) open3d.geometry.Geometry

Clear all elements in the geometry.

Returns:

open3d.geometry.Geometry

static create_from_axis_aligned_bounding_box(aabox: open3d.geometry.AxisAlignedBoundingBox) open3d.geometry.OrientedBoundingBox

Returns an oriented bounding box from the AxisAlignedBoundingBox.

Parameters:

aabox (open3d.geometry.AxisAlignedBoundingBox) – AxisAlignedBoundingBox object from which OrientedBoundingBox is created.

Returns:

open3d.geometry.OrientedBoundingBox

static create_from_points(points: open3d.utility.Vector3dVector, robust: bool = False) open3d.geometry.OrientedBoundingBox

Creates the oriented bounding box that encloses the set of points.

Computes the oriented bounding box based on the PCA of the convex hull. The returned bounding box is an approximation to the minimal bounding box.

Parameters:
  • points (open3d.utility.Vector3dVector) – Input points.

  • robust (bool) – If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

Returns:

The oriented bounding box. The bounding box is oriented such that the axes are ordered with respect to the principal components.

Return type:

open3d.geometry.OrientedBoundingBox

static create_from_points_minimal(points: open3d.utility.Vector3dVector, robust: bool = False) open3d.geometry.OrientedBoundingBox

Creates the oriented bounding box with the smallest volume.

The algorithm makes use of the fact that at least one edge of the convex hull must be collinear with an edge of the minimum bounding box: for each triangle in the convex hull, calculate the minimal axis aligned box in the frame of that triangle. at the end, return the box with the smallest volume

Parameters:
  • points (open3d.utility.Vector3dVector) – Input points.

  • robust (bool) – If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

Returns:

The oriented bounding box. The bounding box is oriented such that its volume is minimized.

Return type:

open3d.geometry.OrientedBoundingBox

dimension(self: open3d.geometry.Geometry) int

Returns whether the geometry is 2D or 3D.

Returns:

int

get_axis_aligned_bounding_box(self: open3d.geometry.Geometry3D) open3d.geometry.AxisAlignedBoundingBox

Returns an axis-aligned bounding box of the geometry.

Returns:

open3d.geometry.AxisAlignedBoundingBox

get_box_points(self: open3d.geometry.OrientedBoundingBox) open3d.utility.Vector3dVector

Returns the eight points that define the bounding box.

Returns:

open3d.utility.Vector3dVector

get_center(self: open3d.geometry.Geometry3D) numpy.ndarray[numpy.float64[3, 1]]

Returns the center of the geometry coordinates.

Returns:

numpy.ndarray[numpy.float64[3, 1]]

get_geometry_type(self: open3d.geometry.Geometry) open3d.geometry.Geometry.Type

Returns one of registered geometry types.

Returns:

open3d.geometry.Geometry.Type

get_max_bound(self: open3d.geometry.Geometry3D) numpy.ndarray[numpy.float64[3, 1]]

Returns max bounds for geometry coordinates.

Returns:

numpy.ndarray[numpy.float64[3, 1]]

get_min_bound(self: open3d.geometry.Geometry3D) numpy.ndarray[numpy.float64[3, 1]]

Returns min bounds for geometry coordinates.

Returns:

numpy.ndarray[numpy.float64[3, 1]]

get_minimal_oriented_bounding_box(self: open3d.geometry.Geometry3D, robust: bool = False) open3d.geometry.OrientedBoundingBox

Returns the minimal oriented bounding box for the geometry.

Creates the oriented bounding box with the smallest volume. The algorithm makes use of the fact that at least one edge of the convex hull must be collinear with an edge of the minimum bounding box: for each triangle in the convex hull, calculate the minimal axis aligned box in the frame of that triangle. at the end, return the box with the smallest volume

Parameters:

robust (bool) – If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

Returns:

The oriented bounding box. The bounding box is oriented such that its volume is minimized.

Return type:

open3d.geometry.OrientedBoundingBox

get_oriented_bounding_box(self: open3d.geometry.Geometry3D, robust: bool = False) open3d.geometry.OrientedBoundingBox

Returns the oriented bounding box for the geometry.

Computes the oriented bounding box based on the PCA of the convex hull. The returned bounding box is an approximation to the minimal bounding box.

Parameters:

robust (bool) – If set to true uses a more robust method which works in degenerate cases but introduces noise to the points coordinates.

Returns:

The oriented bounding box. The bounding box is oriented such that the axes are ordered with respect to the principal components.

Return type:

open3d.geometry.OrientedBoundingBox

get_point_indices_within_bounding_box(self: open3d.geometry.OrientedBoundingBox, points: open3d.utility.Vector3dVector) list[int]

Return indices to points that are within the bounding box.

Parameters:

points (open3d.utility.Vector3dVector) – A list of points.

Returns:

list[int]

static get_rotation_matrix_from_axis_angle(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_quaternion(rotation: numpy.ndarray[numpy.float64[4, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_xyz(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_xzy(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_yxz(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_yzx(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_zxy(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
static get_rotation_matrix_from_zyx(rotation: numpy.ndarray[numpy.float64[3, 1]]) numpy.ndarray[numpy.float64[3, 3]]
is_empty(self: open3d.geometry.Geometry) bool

Returns True iff the geometry is empty.

Returns:

bool

rotate(*args, **kwargs)

Overloaded function.

  1. rotate(self: open3d.geometry.Geometry3D, R: numpy.ndarray[numpy.float64[3, 3]]) -> open3d.geometry.Geometry3D

    Apply rotation to the geometry coordinates and normals.

Parameters:

R (numpy.ndarray[numpy.float64[3, 3]]) – The rotation matrix

Returns:

open3d.geometry.Geometry3D

  1. rotate(self: open3d.geometry.Geometry3D, R: numpy.ndarray[numpy.float64[3, 3]], center: numpy.ndarray[numpy.float64[3, 1]]) -> open3d.geometry.Geometry3D

    Apply rotation to the geometry coordinates and normals.

Parameters:
  • R (numpy.ndarray[numpy.float64[3, 3]]) – The rotation matrix

  • center (numpy.ndarray[numpy.float64[3, 1]]) – Rotation center used for transformation.

Returns:

open3d.geometry.Geometry3D

scale(*args, **kwargs)

Overloaded function.

  1. scale(self: open3d.geometry.Geometry3D, scale: float, center: numpy.ndarray[numpy.float64[3, 1]]) -> open3d.geometry.Geometry3D

    Apply scaling to the geometry coordinates.

Parameters:
  • scale (float) – The scale parameter that is multiplied to the points/vertices of the geometry.

  • center (numpy.ndarray[numpy.float64[3, 1]]) – Scale center used for transformation.

Returns:

open3d.geometry.Geometry3D

  1. scale(self: open3d.geometry.Geometry3D, scale: float, center: numpy.ndarray[numpy.float64[3, 1]]) -> open3d.geometry.Geometry3D

    Apply scaling to the geometry coordinates.

Parameters:
  • scale (float) – The scale parameter that is multiplied to the points/vertices of the geometry.

  • center (numpy.ndarray[numpy.float64[3, 1]]) – Scale center used for transformation.

Returns:

open3d.geometry.Geometry3D

transform(self: open3d.geometry.Geometry3D, arg0: numpy.ndarray[numpy.float64[4, 4]]) open3d.geometry.Geometry3D

Apply transformation (4x4 matrix) to the geometry coordinates.

Parameters:

arg0 (numpy.ndarray[numpy.float64[4, 4]])

Returns:

open3d.geometry.Geometry3D

translate(self: open3d.geometry.Geometry3D, translation: numpy.ndarray[numpy.float64[3, 1]], relative: bool = True) open3d.geometry.Geometry3D

Apply translation to the geometry coordinates.

Parameters:
  • translation (numpy.ndarray[numpy.float64[3, 1]]) – A 3D vector to transform the geometry

  • relative (bool, optional, default=True) – If true, the translation vector is directly added to the geometry coordinates. Otherwise, the center is moved to the translation vector.

Returns:

open3d.geometry.Geometry3D

volume(self: open3d.geometry.OrientedBoundingBox) float

Returns the volume of the bounding box.

Returns:

float

HalfEdgeTriangleMesh = <Type.HalfEdgeTriangleMesh: 7>
Image = <Type.Image: 8>
LineSet = <Type.LineSet: 4>
PointCloud = <Type.PointCloud: 1>
property R

float64 array of shape (3,3 )

RGBDImage = <Type.RGBDImage: 9>
TetraMesh = <Type.TetraMesh: 10>
TriangleMesh = <Type.TriangleMesh: 6>
Unspecified = <Type.Unspecified: 0>
VoxelGrid = <Type.VoxelGrid: 2>
property center

float64 array of shape (3, )

property color

float64 array of shape (3, )

property extent

float64 array of shape (3, )