Back to Aurora Vision Library website

You are here: Start » Function Reference » Computer Vision » Template Matching » LocateMultipleObjects_SAD_Deprecated

LocateMultipleObjects_SAD_Deprecated


Header: AVL.h
Namespace: avl
Module: MatchingBasic

Finds multiple occurrences of a predefined template on an image by analysing the Square Average Difference between pixel values.

Applications: Almost always inferior to NCC, so rarely used in real applications.

Syntax

void avl::LocateMultipleObjects_SAD_Deprecated
(
	const avl::Image& inImage,
	atl::Optional<const avl::Region&> inSearchRegion,
	const avl::GrayModel& inGrayModel,
	int inMinPyramidLevel,
	atl::Optional<int> inMaxPyramidLevel,
	bool inIgnoreBoundaryObjects,
	float inMaxDifference,
	float inMinDistance,
	atl::Array<avl::Object2D>& outObjects,
	atl::Optional<int&> outPyramidHeight = atl::NIL,
	atl::Array<avl::Image>& diagImagePyramid = atl::Dummy<atl::Array<avl::Image>>(),
	atl::Array<avl::Image>& diagMatchPyramid = atl::Dummy<atl::Array<avl::Image>>(),
	atl::Array<atl::Array<float> >& diagScores = atl::Dummy<atl::Array<atl::Array<float>>>()
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Image on which model occurrences will be searched
Input value inSearchRegion Optional<const Region&> NIL Possible centers of the object occurrences
Input value inGrayModel const GrayModel& Model which will be sought
Input value inMinPyramidLevel int 0 - 12 0 Defines the highest resolution level
Input value inMaxPyramidLevel Optional<int> 0 - 12 3 Defines the number of reduced resolution levels that can be used to speed up computations
Input value inIgnoreBoundaryObjects bool False Flag indicating whether objects crossing image boundary should be ignored or not
Input value inMaxDifference float 0.0 - 5.0f Maximum accepted average difference between pixel values
Input value inMinDistance float 0.0 - 10.0f Minimum distance between two matches
Output value outObjects Array<Object2D>& Found objects
Output value outPyramidHeight Optional<int&> NIL Highest pyramid level used to speed up computations
Diagnostic input diagImagePyramid Array<Image>& Pyramid of iteratively downsampled input image
Diagnostic input diagMatchPyramid Array<Image>& Locations found on each pyramid level
Diagnostic input diagScores Array<Array<float> >& Scores of found matches on each pyramid level

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outPyramidHeight.

Read more about Optional Outputs.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.