deepof.utils.fit_ellipse_to_polygon

deepof.utils.fit_ellipse_to_polygon(polygon: list)

Fit an ellipse to the provided polygon.

Parameters:

polygon (list) – List of (x,y) coordinates of the corners of the polygon.

Returns:

(x,y) coordinates of the center of the ellipse. tuple: (a,b) semi-major and semi-minor axes of the ellipse. float: Angle of the ellipse.

Return type:

tuple