convexity — Shape factor for the convexity of a region.
convexity calculates the convexity of each input
If is the area of the convex hull and the original area of the region the shape factor C is defined as:
The shape factor C is 1 if the region is convex (e.g., rectangle, circle etc.). If there are indentations or holes C is smaller than 1.
In the documentation of this chapter (Regions / Features), you can find an image illustrating regions which vary in their convexity.
In case of an empty region the operator
the value 0 (if no other behavior was set (see
If more than one region is passed the numerical values of the
contour length are stored in a tuple, the position of a value in the tuple
corresponding to the position of the region in the input tuple.
Region(s) to be examined.
Convexity of the input region(s).
Convexity <= 1
convexity returns the value 2 (H_MSG_TRUE)
if the input is not empty.
The behavior in case of empty input (no input regions available) is
set via the operator
The behavior in case of empty region (the region is the empty set) is set via
If necessary an exception is raised.