Cross-correlation - Normalized Cross-correlation

Normalized Cross-correlation

For image-processing applications in which the brightness of the image and template can vary due to lighting and exposure conditions, the images can be first normalized. This is typically done at every step by subtracting the mean and dividing by the standard deviation. That is, the cross-correlation of a template, with a subimage is

.

where is the number of pixels in and, is the average of f and is standard deviation of f. In functional analysis terms, this can be thought of as the dot product of two normalized vectors. That is, if

and

then the above sum is equal to

where is the inner product and is the L² norm. Thus, if f and t are real matrices, their normalized cross-correlation equals the cosine of the angle between the unit vectors F and T, being thus 1 if and only if F equals T multiplied by a positive scalar.

Normalized correlation is one of the methods used for template matching, a process used for finding incidences of a pattern or object within an image. It is also the 2-dimensional version of Pearson product-moment correlation coefficient.

Read more about this topic:  Cross-correlation