mmocr.utils.bbox_diag_distance¶
- mmocr.utils.bbox_diag_distance(box)[源代码]¶
Calculate the diagonal length of a bounding box (distance between the top-left and bottom-right).
- 参数
box (ArrayLike) – The bounding box represented in
[x1 –
y1 –
x2 –
y2 –
x3 –
y3 –
x4 –
or [x1 (y4]) –
y1 –
x2 –
y2] –
- 返回
The diagonal length of the bounding box.
- 返回类型