Geometric Primitives

A set of geometric primitives.

Box

class autolab_core.Box(min_pt, max_pt, frame='unspecified')

A 2D box or 3D rectangular prism.

dims

Maximal extent in x, y, and (optionally) z.

Type

numpy.ndarray of float

width

Maximal extent in x.

Type

float

height

Maximal extent in y.

Type

float

area

Area of projection onto xy plane.

Type

float

min_pt

The minimum x, y, and (optionally) z points.

Type

numpy.ndarray of float

max_pt

The maximum x, y, and (optionally) z points.

Type

numpy.ndarray of float

center

The center of the box in 2 or 3D coords.

Type

numpy.ndarray of float

frame

The frame in which this box is placed.

Type

str

Contour

class autolab_core.Contour(boundary_pixels, area=0.0, frame='unspecified')

A set of pixels forming the boundary of an object of interest in an image.

boundary_pixels

Nx2 array of pixel coordinates on the boundary of a contour

Type

numpy.ndarray

bounding_box

smallest box containing the contour

Type

Box

area

area of the contour

Type

float

num_pixels

number of pixels along the boundary

Type

int