mp.tasks.components.containers.NormalizedRect

A rectangle with rotation in normalized coordinates.

Location of the center of the rectangle in image coordinates. The (0.0, 0.0) point is at the (top, left) corner.

The values of box center location and size are within [0, 1].

x_center The normalized X coordinate of the rectangle, in image coordinates.
y_center The normalized Y coordinate of the rectangle, in image coordinates.
width The width of the rectangle.
height The height of the rectangle.
rotation Rotation angle is clockwise in radians.
rect_id Optional unique id to help associate different rectangles to each other.

Methods

__eq__

View source

Checks if this object is equal to the given object.

Args
other The object to be compared with.

Returns
True if the objects are equal.

rect_id None
rotation 0.0