cv3.utils.xyxy2xywh

cv3.utils.xyxy2xywh(x0, y0, x1, y1)[source]

Convert from (x0, y0, x1, y1) to (x, y, width, height) format.

Parameters:
  • x0 (float) – X-coordinate of the top-left corner.

  • y0 (float) – Y-coordinate of the top-left corner.

  • x1 (float) – X-coordinate of the bottom-right corner.

  • y1 (float) – Y-coordinate of the bottom-right corner.

Returns:

(x, y, width, height) representation of the rectangle.

Return type:

tuple