LocateMultipleObjects_NCC2
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_NCC2( inImage: Image, inGrayModel: GrayModel2, /, *, 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 | |
|---|---|---|---|---|---|
![]() |
inImage | Image | Image on which model occurrences will be searched | ||
![]() |
inSearchRegion | ShapeRegion | None | None | Range of possible object centers | |
![]() |
inSearchRegionAlignment | CoordinateSystem2D | None | None | Adjusts the region of interest to the position of the inspected object | |
![]() |
inGrayModel | GrayModel2 | Model of objects to be searched | ||
![]() |
inMinPyramidLevel | int | 0 - 12 | 0 | Defines the lowest pyramid level at which object position is still refined |
![]() |
inMaxPyramidLevel | int | None | 0 - 12 | 3 | Defines the total 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 | |
![]() |
inMinScore | float | -1.0 - 1.0 | 0.7 | Minimum score of object candidates accepted at each pyramid level |
![]() |
inMinDistance | float | 0.0 - ![]() |
10.0 | Minimum distance between two found objects |
![]() |
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 |
![]() |
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 |
![]() |
outObjects | list[Object2D] | Found objects | ||
![]() |
outPyramidHeight | int | Highest pyramid level used to speed up computations | ||
![]() |
outAlignedSearchRegion | ShapeRegion | None | None | Transformed input shape region | |
![]() |
diagImagePyramid | list[Image] | Pyramid of iteratively downsampled input image | ||
![]() |
diagMatchPyramid | list[Image] | Candidate object locations found at each pyramid level | ||
![]() |
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.




