The operator convexity_xldconvexity_xldConvexityXldConvexityXldConvexityXld 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
determined with test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXld). If
the input contour or polygon is not closed it will be closed automatically.
Calculation:
If is the area of the convex hull and
the area enclosed by the original contour or
polygon the shape factor ConvexityConvexityConvexityConvexityconvexity is defined
as:
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 XLDXLDXLDXLDXLD.