rect2d.py
rerun.components.rect2d
class RectFormat
Bases: Enum
How to specify rectangles (axis-aligned bounding boxes).
XYWH = 'XYWH'
class-attribute
instance-attribute
[x,y,w,h], with x,y = left,top.
YXHW = 'YXHW'
class-attribute
instance-attribute
[y,x,h,w], with x,y = left,top.
XYXY = 'XYXY'
class-attribute
instance-attribute
[x0, y0, x1, y1], with x0,y0 = left,top and x1,y1 = right,bottom.
YXYX = 'YXYX'
class-attribute
instance-attribute
[y0, x0, y1, x1], with x0,y0 = left,top and x1,y1 = right,bottom.
XCYCWH = 'XCYCWH'
class-attribute
instance-attribute
[x_center, y_center, width, height].
XCYCW2H2 = 'XCYCW2H2'
class-attribute
instance-attribute
[x_center, y_center, width/2, height/2].
class Rect2DArray
Bases: ExtensionArray
def from_numpy_and_format(array, rect_format)
Build a Rect2DArray
from an Nx4 numpy array.