目标检测结果xyxy和xywh相互转换

1.xyxy转xywh

x = Xmin;
y = Ymin;
w = Xmax - Xmin + 1;
h = Ymax - Ymin + 1;

2.xywh转xyxy

Xmin = x;
Ymin = y;
Xmax = x + w - 1;
Ymax = y + h - 1;

你可能感兴趣的:(目标检测,人工智能)