convexity ( Regions : : : Convexity )

Shape factor for the convexity of a region.

The operator convexity calculates the convexity of each input region of Regions.

Calculation: If $Fc$ is the area of the convex hull and $Fo$ the
            original area of the region the shape factor $C$
            is defined as:
                                      C = Fo / Fc
3cm C = F_{o}{F_{c}} description 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 case of an empty region the operator convexity returns the value 0 (if no other behavior was set (see set_system)). 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.


Parameters

Regions (input_object)
region(-array) -> object
Region(s) to be examined.

Convexity (output_control)
real(-array) -> real
Convexity of the input region(s).
Assertion: Convexity <= 1


Result

The operator convexity returns the value TRUE if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator set_system(::'no_object_result',<Result>:). The behavior in case of empty region (the region is the empty set) is set via set_system(::'empty_region_result',<Result>:). If necessary an exception is raised.


Possible Predecessors

threshold__, regiongrowing__, connection


See also

select_shape, area_center, shape_trans



Copyright © 1996-1997 MVTec Software GmbH