NVIDIA 2D Image And Signal Performance Primitives (NPP)
Version 22.3.0.*

Primitives for computing the proximity measure between a source image and a template image. More...
Modules  
SqrDistanceFull_Norm  
Primitives for computing the normalized Euclidean distance between two images with full mode.  
SqrDistanceSame_Norm  
Primitives for computing the normalized Euclidean distance between two images with same mode.  
SqrDistanceValid_Norm  
Primitives for computing the normalized Euclidean distance between two images with valid mode.  
CrossCorrFull_Norm  
Primitives for computing the normalized cross correlation between two images with full mode.  
CrossCorrSame_Norm  
Primitives for computing the normalized cross correlation between two images with same mode.  
CrossCorrValid_Norm  
Primitives for computing the normalized cross correlation between two images with valid mode.  
CrossCorrValid  
Primitives for computing the cross correlation between two images with valid mode.  
CrossCorrFull_NormLevel  
Primitives for computing the normalized cross correlation coefficient between two images with full mode.  
CrossCorrSame_NormLevel  
Primitives for computing the normalized cross correlation coefficient between two images with same mode.  
CrossCorrValid_NormLevel  
Primitives for computing the normalized cross correlation coefficient between two images with valid mode.  
CrossCorrFull_NormLevelAdvanced  
Primitives for computing the normalized cross correlation coefficient between two images with full mode with large image template sizes.  
CrossCorrSame_NormLevelAdvanced  
Primitives for computing the normalized cross correlation coefficient between two images with same mode with large image template sizes.  
CrossCorrValid_NormLevelAdvanced  
Primitives for computing the normalized cross correlation coefficient between two images with valid mode with large template sizes.  
Primitives for computing the proximity measure between a source image and a template image.
There are basically two approaches to compute the proximity measure for template matching, Euclidean distance and the cross correlation.
The larger the cross correlation value is, the more similar the source image and the template image is around the pixel.
NPP computes the normalized values of Euclidean distance, cross correlation and the cross correlation coefficient.
The and denote the auto correlation of the source image and the template image individually. They are defined as:
The and are defined as:
where is the template mean minus the mean of the image in the region just under the template.
The Euclidean distance and the cross correlation are categorized into three types, full, same, and valid.