Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Region » Region Relations » ClassifyRegions

ClassifyRegions


Module: FoundationBasic

Splits an array of regions according to the selected feature and range.

Applications

Use this filter when you have an array of regions and you want to select some of them for further processing.
Name Type Description
inRegions RegionArray Input regions
inFeature RegionFeature Region feature value to be computed
inMinimum Real* Lowest value of the range
inMaximum Real* Highest value of the range
outAccepted RegionArray Regions with feature values matching the range
outRejected RegionArray Regions with feature values outside the range
outBelow RegionArray Regions with feature values lower than inMinimum
outAbove RegionArray Regions with feature values higher than inMaximum
outValues RealArray Computed feature values

Description

The filter accepts an array of regions and splits it into output arrays, depending on how each of the computed feature values fits the (inMinimum, inMaximum) range.

  • Regions corresponding to feature values lower than inMinimum are passed onto outBelow and outRejected.
  • Regions corresponding to feature values that fit closed range (inMinimum, inMaximum) are passed onto outAccepted.
  • Regions corresponding to feature values higher than inMaximum are passed onto outAbove and outRejected.

In the special case of inMinimum being greater than inMaximum, first matching condition is applied, which means that objects corresponding to values higher than inMaximum and lower than inMinimum are passed onto outBelow.

To learn about possible features to classify regions, one should see RegionFeature documentation. To know details about particular feature, corresponding filter article should be read.

Hints

  • Connect an array of regions to the inRegions input.
  • Using the inFeature input select a feature that well separates the interesting objects.
  • Set the range of inMinimum and inMaximum to define the accepted objects. Refer to the outValues output to see the feature values for all input objects.

Examples

Description of usage of this filter can be found in examples and tutorial: Calibration World Coordinates On Original Images, Chocolate Cookies Inspection 3D, Coins, Nails, Screws and Nuts, Count Nails, Classify the Mounts.

ClassifyRegions performed with Elongation selected as the region feature and inMaximum = 10. The blue regions are from outAccepted output, the orange ones from outRejected.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • ClassifyByRange – Separates the elements of the input array into three output arrays, depending on whether the related values fall below, into or above the specified 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.
  • SortRegions – Changes the order of regions from the input array according to an ascending/descending sequence of their computed feature values.