box_xyxy_to_xyxyr: box_xyxy_to_xyxyr

View source: R/ops-box_convert.R

box_xyxy_to_xyxyrR Documentation

box_xyxy_to_xyxyr

Description

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.

Usage

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.


torchvision documentation built on Oct. 14, 2026, 1:09 a.m.