mmocr.utils.bbox_diag_distance¶
- mmocr.utils.bbox_diag_distance(box)[source]¶
Calculate the diagonal length of a bounding box (distance between the top-left and bottom-right).
- Parameters
box (ArrayLike) – The bounding box represented in
[x1 –
y1 –
x2 –
y2 –
x3 –
y3 –
x4 –
or [x1 (y4]) –
y1 –
x2 –
y2] –
- Returns
The diagonal length of the bounding box.
- Return type