Loading [MathJax]/extensions/tex2jax.js
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
Input value inImage const Image& Image on which object occurrences will be searched
Input value inSearchRegion Optional<const ShapeRegion&> NIL Region of possible object centers
Input value inSearchRegionAlignment Optional<const CoordinateSystem2D&> NIL Adjusts the region of interest to the position of the inspected object
Input value inEdgeModel const EdgeModel_Elastic& Model of objects to be searched
Input value inDetectionStrategy ElasticMatchingDetectionStrategy::Type Fast Specifies initial candidates detection mode
Input value inEdgeThreshold float 0.1 - 10.0f Minimum strength of edges used for matching with the model
Input value inMinAspectRatio float 0.5 - 2.0 1.0f Minimum expected aspect ratio of object occurrence being found
Input value inMaxAspectRatio float 0.5 - 2.0 1.0f Maximum expected aspect ratio of object occurrence being found
Input value inMinScore float 0.0 - 1.0 0.7f Minimum score of an object occurrence
Output value outObjects Array<Object2D>& Found objects
Output value outObjectEdges Array<Array<Path>>& Model edges of the found objects
Output value 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.