Back to Adaptive Vision Library website
You are here: Start » Function Reference » Region Features » RegionConvexity
RegionConvexity
Computes the area of a region divided by area of its convex hull.
Syntax
C++
C#
void avl::RegionConvexity ( const avl::Region& inRegion, float& outConvexity )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inRegion | const Region& | Input region | ||
outConvexity | float& |
Description
Convexity is a measure of how close a region is to being convex. Convex regions have convexity equal to 1.0, while the more concave the region is, the closer to 0.0 is its convexity.
Mathematically, the convexity is calculated as follows:
Hints
- If the input region is not guaranteed to be non-empty, precede this filter with SkipEmptyRegion.
Examples
Errors
Error type | Description |
---|---|
DomainError | Degenerate region on input in RegionConvexity. |