paralleldomain.model.geometry.bounding_box_3d

class BoundingBox3DBaseGeometry(pose, width, height, length)

Represents a 3D Bounding Box geometry with a generic coordinate precision of either int or float.

Parameters:
pose

6D Pose for box in 3D sensor space.

length

Length of box in meter along x-axis.

width

Width of box in meter along y-axis.

height

Height of box in meter along z-axis.

class_id

Class ID of annotated object. Can be used to lookup more details in ClassMap.

instance_id

Instance ID of annotated object. Can be used to cross-reference with other instance annotation types, e.g., InstanceSegmentation2D or InstanceSegmentation3D.

num_points

Number of LiDAR points of related Sensor.

attributes

Dictionary of arbitrary object attributes.

classmethod merge_boxes(target_box, source_box)

Takes two 3D box geometries as input and merges both into a new box geometry. The resulting box geometry has dimensions from target_box and source_box merged into it.

Return type:

BoundingBox3DBaseGeometry[TypeVar(T, int, float)]

Parameters:
property edges: ndarray

Returns the 3D edges of a bounding box.

Edges are returned in order of connecting the vertices in the following order:

  • [0, 1]

  • [1, 2]

  • [2, 3]

  • [3, 0]

  • [4, 5]

  • [5, 6]

  • [6, 7]

  • [7, 4]

  • [2, 6]

  • [7, 3]

  • [1, 5]

  • [4, 0]

   5--------6
  /|   top /|
 / |      / |
1--------2  |
|  4-----|--7
| /      | /
|/       |/ left
0--------3
  front
property faces: ndarray

Returns the 3D faces of a bounding box.

Faces are returned in order of connecting the vertices in the following order:

  • [0, 1, 2, 3] (front)

  • [4, 5, 6, 7] (back)

  • [3, 2, 6, 7] (left)

  • [0, 1, 5, 4] (right)

  • [6, 2, 1, 5] (top)

  • [7, 3, 0, 4] (bottom)

   5--------6
  /|   top /|
 / |      / |
1--------2  |
|  4-----|--7
| /      | /
|/       |/ left
0--------3
  front
property vertices: ndarray

Returns the 3D vertices of a bounding box.

Vertices are returned in the following order:

   5--------6
  /|   top /|
 / |      / |
1--------2  |
|  4-----|--7
| /      | /
|/       |/ left
0--------3
  front
property volume: T

Returns volume of 3D Bounding Box in cubic meter.

class BoundingBox3DGeometry(pose, width, height, length)
Parameters:
  • pose (Transformation) –

  • width (T) –

  • height (T) –

  • length (T) –

classmethod merge_boxes(target_box, source_box)

Takes two 3D box geometries as input and merges both into a new box geometry. The resulting box geometry has dimensions from target_box and source_box merged into it.

Return type:

BoundingBox3DBaseGeometry[TypeVar(T, int, float)]

Parameters:
property edges: ndarray

Returns the 3D edges of a bounding box.

Edges are returned in order of connecting the vertices in the following order:

  • [0, 1]

  • [1, 2]

  • [2, 3]

  • [3, 0]

  • [4, 5]

  • [5, 6]

  • [6, 7]

  • [7, 4]

  • [2, 6]

  • [7, 3]

  • [1, 5]

  • [4, 0]

   5--------6
  /|   top /|
 / |      / |
1--------2  |
|  4-----|--7
| /      | /
|/       |/ left
0--------3
  front
property faces: ndarray

Returns the 3D faces of a bounding box.

Faces are returned in order of connecting the vertices in the following order:

  • [0, 1, 2, 3] (front)

  • [4, 5, 6, 7] (back)

  • [3, 2, 6, 7] (left)

  • [0, 1, 5, 4] (right)

  • [6, 2, 1, 5] (top)

  • [7, 3, 0, 4] (bottom)

   5--------6
  /|   top /|
 / |      / |
1--------2  |
|  4-----|--7
| /      | /
|/       |/ left
0--------3
  front
property vertices: ndarray

Returns the 3D vertices of a bounding box.

Vertices are returned in the following order:

   5--------6
  /|   top /|
 / |      / |
1--------2  |
|  4-----|--7
| /      | /
|/       |/ left
0--------3
  front
property volume: T

Returns volume of 3D Bounding Box in cubic meter.