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