convexity_xld — Shape factor for the convexity of contours or polygons.
convexity_xld calculates the convexity for each input
contour or polygon. The input contour or polygon must not
intersect itself, otherwise the resulting parameter is not meaningful
(Whether the input contour or polygon intersects itself or not can be
the input contour or polygon is not closed it will be closed automatically.
If is the area of the convex hull and
the area enclosed by the original contour or
polygon the shape factor
Convexity is defined
The shape factor
Convexity is 1 if the contour or polygon is convex
(e.g., a rectangle, circle, etc.). If there are indentations
Convexity is smaller than 1.
If more than one contour or polygon is passed, the numerical results of the
shape factor are stored in a tuple in the same order as the respective
contours or polygons in
Contours or polygons to be examined.
Convexity of the input contours or polygons.
Convexity <= 1
convexity_xld returns the value TRUE
if the input is not empty.
The behavior in case of empty input (no input contour available) is
set via the operator
If necessary an exception is raised.