Converts bounding boxes from \((x_{min}, y_{min}, x_{max}, y_{max})\) format to \((x_{min}, y_{min}, x_{max}, y_{max}, r_{deg})\) format, where \(r_{deg}\) is the rotation angle in degrees (anti-clockwise). Handles composition natively.

box_xyxy_to_xyxyr(boxes, angle = 0)

Arguments

boxes

(Tensor[N, 4] or [N, 5]): boxes in \((x_{min}, y_{min}, x_{max}, y_{max})\) or \((x_{min}, y_{min}, x_{max}, y_{max}, r_{deg})\) format, where \(r_{deg}\) format.

angle

(numeric): Rotation angle in degrees (anti-clockwise). A single numeric value or a tensor of shape (N,). Default is 0.

Value

(Tensor[N, 5]): boxes in \((x_{min}, y_{min}, x_{max}, y_{max}, r_{deg})\) format with accumulated angle.