Back to Aurora Vision Library website

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

LocateSingleObject_SAD_Deprecated


Header: AVL.h
Namespace: avl
Module: MatchingBasic

Finds a single occurrence 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::LocateSingleObject_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,
	atl::Conditional<avl::Object2D>& outObject,
	atl::Optional<int&> outPyramidHeight = atl::NIL,
	atl::Array<avl::Image>& diagImagePyramid,
	atl::Array<avl::Image>& diagMatchPyramid,
	atl::Conditional<atl::Array<float>>& diagScores
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Image on which model occurrence will be searched
Input value inSearchRegion Optional<const Region&> NIL Possible centers of the object occurrence
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 - 0.0f Maximum accepted average difference between pixel values
Output value outObject Conditional<Object2D>& Found object
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 Conditional<Array<float>>& Scores of found match 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.