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

LocateSingleObject_Elastic
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | MatchingPro |
Finds a single occurrence of a predefined template on an image by comparing object edges.
Applications: Detection of an object whose outlines are sharp and rigid. Often one of the first filters in a program.
Syntax
C++
C#
void fil::LocateSingleObject_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::Conditional<fil::Object2D>& outObject, ftl::Optional<ftl::Conditional<ftl::Array<fil::Path>>&> outObjectEdges = 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.01 - ![]() |
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 |
![]() |
outObject | Conditional<Object2D>& | Found object | ||
![]() |
outObjectEdges | Optional<Conditional<Array<Path>>&> | NIL | Model edges of the found object |
Optional Outputs
The computation of following outputs can be switched off by passing value ftl::NIL
to these parameters: outObjectEdges.
Read more about Optional Outputs.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.