Shortcuts

mmocr.utils.bbox_center_distance

mmocr.utils.bbox_center_distance(box1, box2)[source]

Calculate the distance between the center points of two bounding boxes.

Parameters
  • box1 (ArrayLike) – The first bounding box represented in [x1, y1, x2, y2].

  • box2 (ArrayLike) – The second bounding box represented in [x1, y1, x2, y2].

Returns

The distance between the center points of two bounding boxes.

Return type

float