Back to Aurora Vision Library website

You are here: Start » Function Reference » Path » Path Classification » ClassifyPaths

ClassifyPaths


Header: AVL.h
Namespace: avl
Module: FoundationBasic

Splits the paths of the input array - in accordance to the relation between computed feature values and the specified range.

Applications: Use this filter when you have an array of paths and you want to select some of them for further processing.

Syntax

C++
C#
 
void avl::ClassifyPaths
(
	const atl::Array<avl::Path>& inPaths,
	avl::PathFilter::Type inPathFilter,
	avl::PathFeature::Type inFeature,
	atl::Optional<float> inMinimum,
	atl::Optional<float> inMaximum,
	atl::Optional<atl::Array<avl::Path>&> outAccepted,
	atl::Optional<atl::Array<avl::Path>&> outRejected = atl::NIL,
	atl::Optional<atl::Array<avl::Path>&> outBelow = atl::NIL,
	atl::Optional<atl::Array<avl::Path>&> outAbove = atl::NIL,
	atl::Optional<atl::Array<float>&> outValues = atl::NIL
)

Parameters

Name Type Default Description
Input value inPaths const Array<Path>& Input paths
Input value inPathFilter PathFilter::Type Determines which paths will take part in computation
Input value inFeature PathFeature::Type Path feature value to be computed
Input value inMinimum Optional<float> NIL Lowest value of the range
Input value inMaximum Optional<float> NIL Highest value of the range
Output value outAccepted Optional<Array<Path>&> Paths with feature values matching the range
Output value outRejected Optional<Array<Path>&> NIL Paths with feature values outside the range
Output value outBelow Optional<Array<Path>&> NIL Paths with feature values lower than inMinimum
Output value outAbove Optional<Array<Path>&> NIL Paths with feature values higher than inMaximum
Output value outValues Optional<Array<float>&> NIL Computed feature values

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outAccepted, outRejected, outBelow, outAbove, outValues.

Read more about Optional Outputs.

Description

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

  • Paths corresponding to feature values lower than inMinimum are passed onto outBelow and outRejected.
  • Paths corresponding to feature values that fit closed range (inMinimum, inMaximum) are passed onto outAccepted.
  • Paths 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.

Paths can be filtered before classification. One can process all paths, only open or only closed ones, depending on value of inPathFilter input.

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

Hints

  • Pass an array of paths to the inPaths input.
  • Using the inFeature input select a feature that well separates the interesting objects.
  • Using the inPathFilter input you can also separate only closed or only open paths.
  • 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.

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.
  • GetMaximumPath – Returns the path from the input array that corresponds to the largest computed feature value.
  • GetMinimumPath – Returns the path from the input array that corresponds to the smallest computed feature value.
  • SortPaths – Changes the order of paths from the input array according to an ascending/descending sequence of their computed feature values.
  • SelectOuterPaths – Selects paths which do not obstruct visibility of other paths from a point.