Third-party Libraries

imutils_boundingrect

imutils_boundingrect.minimum_bounding_rectangle(points)

Find the smallest bounding rectangle for a set of points. Returns a set of points representing the corners of the bounding box.

Parameters:points – an nx2 matrix of coordinates
Returns Mx:(matrix) nx2 of coordinates

imutils_perspective

imutils_perspective

imutils_perspective.four_point_transform(image, pts)

four_point_transform. Order Points

Parameters:
  • image – (Image) input image
  • pts – (Array) four points
Returns warped:

(Image) warped image

imutils_perspective.order_points(pts)

order_points. Order Points

Parameters:pts – (Array) points to be ordered
Returns coordinates:
 (Array) return the coordinates in top-left, top-right, bottom-right, and bottom-left order