LocateMultipleObjects_NCC


Finds all occurrences of a predefined template on an image by analysing the normalized correlation between pixel values.

Applications:Detection of objects with blurred or unclear edges. Often one of the first filters in a program.

Syntax

C++
C#
Python
 
def LocateMultipleObjects_NCC(
	inImage: Image,
	inGrayModel: GrayModel,
	/,
	*,
	inSearchRegion: ShapeRegion | None = None,
	inSearchRegionAlignment: CoordinateSystem2D | None = None,
	inMinPyramidLevel: int = 0,
	inMaxPyramidLevel: int | None = 3,
	inIgnoreBoundaryObjects: bool = False,
	inMinScore: float = 0.7,
	inMinDistance: float = 10.0,
	inMaxBrightnessRatio: float | None = None,
	inMaxContrastRatio: float | None = None,
	outAlignedSearchRegion: ShapeRegion | None = None
)
-> (
	outObjects: list[Object2D],
	outPyramidHeight: int,
	diagImagePyramid: list[Image],
	diagMatchPyramid: list[Image],
	diagScores: list[ list[float] ]
)

Parameters

Name Type Range Default Description
Input value inImage Image Image on which model occurrences will be searched
Input value inSearchRegion ShapeRegion | None None Range of possible object centers
Input value inSearchRegionAlignment CoordinateSystem2D | None None Adjusts the region of interest to the position of the inspected object
Input value inGrayModel GrayModel Model of objects to be searched
Input value inMinPyramidLevel int 0 - 12 0 Defines the lowest pyramid level at which object position is still refined
Input value inMaxPyramidLevel int | None 0 - 12 3 Defines the total 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 inMinScore float -1.0 - 1.0 0.7 Minimum score of object candidates accepted at each pyramid level
Input value inMinDistance float 0.0 - 10.0 Minimum distance between two found objects
Input value inMaxBrightnessRatio float | None 1.0 - None Defines the maximal deviation of the mean brightness of the model object and the object present in the image
Input value inMaxContrastRatio float | None 1.0 - None Defines the maximal deviation of the brightness standard deviation of the model object and the object present in the image
Output value outObjects list[Object2D] Found objects
Output value outPyramidHeight int Highest pyramid level used to speed up computations
Output value outAlignedSearchRegion ShapeRegion | None None Transformed input shape region
Diagnostic input diagImagePyramid list[Image] Pyramid of iteratively downsampled input image
Diagnostic input diagMatchPyramid list[Image] Candidate object locations found at each pyramid level
Diagnostic input diagScores list[ list[float] ] Scores of the found objects at each pyramid level

Hardware Acceleration

This operation is optimized for SSE2 technology for pixels of type: UINT8.

This operation is optimized for AVX2 technology for pixels of type: UINT8.

This operation is optimized for NEON technology for pixels of type: UINT8.

This operation supports automatic parallelization for multicore and multiprocessor systems.