Back to FabImage Library website
You are here: Start » Function Reference » Computer Vision » Template Matching » LocateMultipleObjects_Elastic

LocateMultipleObjects_Elastic
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | MatchingPro |
Finds all occurrences of a predefined template on an image by comparing object edges.
Applications: Detection of multiple objects whose outlines are sharp and rigid. Often one of the first filters in a program.
Syntax
C++
C#
void fil::LocateMultipleObjects_Elastic ( const fil::Image& inImage, ftl::Optional<const fil::ShapeRegion&> inSearchRegion, ftl::Optional<const fil::CoordinateSystem2D&> inSearchRegionAlignment, const fil::EdgeModel_Elastic& inEdgeModel, fil::ElasticMatchingDetectionStrategy::Type inDetectionStrategy, float inEdgeThreshold, float inMinAspectRatio, float inMaxAspectRatio, float inMinScore, ftl::Array<fil::Object2D>& outObjects, ftl::Array<ftl::Array<fil::Path>>& outObjectEdges, ftl::Optional<fil::ShapeRegion&> outAlignedSearchRegion = ftl::NIL )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Image on which object occurrences will be searched | ||
![]() |
inSearchRegion | Optional<const ShapeRegion&> | NIL | Region of possible object centers | |
![]() |
inSearchRegionAlignment | Optional<const CoordinateSystem2D&> | NIL | Adjusts the region of interest to the position of the inspected object | |
![]() |
inEdgeModel | const EdgeModel_Elastic& | Model of objects to be searched | ||
![]() |
inDetectionStrategy | ElasticMatchingDetectionStrategy::Type | Fast | Specifies initial candidates detection mode | |
![]() |
inEdgeThreshold | float | 0.1 - ![]() |
10.0f | Minimum strength of edges used for matching with the model |
![]() |
inMinAspectRatio | float | 0.5 - 2.0 | 1.0f | Minimum expected aspect ratio of object occurrence being found |
![]() |
inMaxAspectRatio | float | 0.5 - 2.0 | 1.0f | Maximum expected aspect ratio of object occurrence being found |
![]() |
inMinScore | float | 0.0 - 1.0 | 0.7f | Minimum score of an object occurrence |
![]() |
outObjects | Array<Object2D>& | Found objects | ||
![]() |
outObjectEdges | Array<Array<Path>>& | Model edges of the found objects | ||
![]() |
outAlignedSearchRegion | Optional<ShapeRegion&> | NIL | Transformed input shape region |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outAlignedSearchRegion.
Read more about Optional Outputs.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Not enough pyramid levels in LocateMultipleObjects_Elastic. |