units#

Very basic units or unit-like things

class perceptivo.types.units.Ellipse(x: int, y: int, a: float, b: float, t: float)#

Bases: object

Parameterization of an ellipse corresponding to a Pupil

Attrs:

x (int): Ellipse center in pixels y (int): Ellipse center in pixels a (float): Major axis in pixels b (float): Minor axis in pixels t (float): Orientation in radians, clockwise from vertical

x: int#
y: int#
a: float#
b: float#
t: float#
mask(scale: float = 1) Tuple[numpy.ndarray, numpy.ndarray]#

Coordinates for a boolean mask, created with skimage.draw.ellipse()

Note

When calling ellipse, y is used as the 0th dimension and x as the 1st, since rows in a frame (y) are typically the 0th dimension.

Parameters

scale (float) – Scale the major and minor axes by this much!

Returns

tuple of two ndarrays, coordinates in the 0th and 1st axis of the mask points