Visible to Intel only — GUID: GUID-FFA87197-C9D7-4B94-A2D8-2892EE4EB3EC
Visible to Intel only — GUID: GUID-FFA87197-C9D7-4B94-A2D8-2892EE4EB3EC
Image Proximity Measures
The functions described in this section compute the proximity (similarity) measure between an image and a template (another image). These functions may be used as feature detection functions, as well as the components of more sophisticated techniques.
There are several ways to compute the measure of similarity between two images. One way is to compute the Euclidean distance, or sum of the squared distances (SSD), of an image and a template. The smaller is the value of SSD at a particular pixel, the more similarity exists between the template and the image in the neighborhood of that pixel.
The squared Euclidean distance Stx(r,c) between a template and an image for the pixel in row r and column c is given by the equation:
where x(r,c) is the image pixel value in row r and column c, and t(j,i) is the template pixel value in row j and column i; template size is tplCols by tplRows and its center is positioned at (r,c).
The other similarity measure is the cross-correlation function: the higher is the cross-correlation at a particular pixel, the more similarity exists between the template and the image in the neighborhood of that pixel.
The cross-correlation Rtx(r,c) between a template and an image at the pixel in row r and column c is computed by the equation :
The cross-correlation function is dependent on the brightness variation across the image. To avoid this dependence, the correlation coefficient function is used instead. It is defined as:
where t with the overline is the mean of the template, and x with the overline is the mean of the image in the region just under the template.
All Intel IPP proximity functions compute normalized values of SSD, cross-correlation and correlation coefficient that are defined as follows:
normalized SSD: σtx(r,c)
normalized cross-correlation ρtx( r,c):
Here Rxx and Rtt denote the autocorrelation of the image and the template, respectively:
Normalized correlation coefficient γtx(r,c):
Here Gxx and Gtt denote the autocorrelations of the image and the template without constant brightness component, respectively:
- SqrDistanceNormGetBufferSize
Computes the size of the work buffer for the ippiSqrDistanceNorm function. - SqrDistanceNorm
Computes Euclidean distance between an image and a template. - CrossCorrNormGetBufferSize
Computes the size of the work buffer for the ippiCrossCorrNorm function. - CrossCorrNorm
Computes a normalized cross-correlation between an image and a template. - SADGetBufferSize
Computes the size of the work buffer for the ippiSAD function. - SAD
Computes sums of absolute differences (SAD) for a template image and different locations within a source image where the template image can fit.