Back to Adaptive Vision Library website
You are here: Start » Function Reference » Region Relations » SortRegions
SortRegions
Changes the order of regions from the input array accordingly to an ascending/descending sequence of their computed feature values.
Header: | AVL.h |
---|
Syntax
C++
C#
void avl::SortRegions ( const atl::Array<avl::Region>& inRegions, avl::RegionFeature::Type inFeature, avl::SortingOrder::Type inSortingOrder, atl::Array<avl::Region>& outSortedRegions, atl::Optional<atl::Array<float>&> outSortedValues = atl::NIL )
Parameters
Name | Type | Default | Description | |
---|---|---|---|---|
inRegions | const Array<Region>& | Input regions | ||
inFeature | RegionFeature::Type | Region feature value to be computed | ||
inSortingOrder | SortingOrder::Type | Sorting order | ||
outSortedRegions | Array<Region>& | Regions sorted according to the computed feature values | ||
outSortedValues | Optional<Array<float>&> | NIL | Computed feature values |
Description
The filter sorts the array of input regions according to the selected feature values computed for each of them.
Examples
See Also
- ClassifyRegions – Splits an array of regions according to the selected feature and range.
- GetMaximumRegion – Returns the region from the input array that corresponds to the largest computed feature value.
- GetMinimumRegion – Returns the region from the input array that corresponds to the smallest computed feature value.
- SortArray – Changes the order of the input array elements accordingly to an ascending/descending sequence of the value array.