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

LocateSingleObject_SAD_Deprecated
Header: | FIL.h |
---|---|
Namespace: | fil |
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 fil::LocateSingleObject_SAD_Deprecated ( const fil::Image& inImage, ftl::Optional<const fil::Region&> inSearchRegion, const fil::GrayModel& inGrayModel, int inMinPyramidLevel, ftl::Optional<int> inMaxPyramidLevel, bool inIgnoreBoundaryObjects, float inMaxDifference, ftl::Conditional<fil::Object2D>& outObject, ftl::Optional<int&> outPyramidHeight = ftl::NIL, ftl::Array<fil::Image>& diagImagePyramid, ftl::Array<fil::Image>& diagMatchPyramid, ftl::Conditional<ftl::Array<float>>& diagScores )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inImage | const Image& | Image on which model occurrence will be searched | ||
![]() |
inSearchRegion | Optional<const Region&> | NIL | Possible centers of the object occurrence | |
![]() |
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 - ![]() |
0.0f | Maximum accepted average difference between pixel values |
![]() |
outObject | Conditional<Object2D>& | Found object | ||
![]() |
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 | 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 ftl::NIL
to these parameters: outPyramidHeight.
Read more about Optional Outputs.
Hardware Acceleration
This operation supports automatic parallelization for multicore and multiprocessor systems.