Normalized cross correlation
m = zncc(i1, i2) is the zero-mean normalized cross-correlation between the two equally sized image patches i1 and i2. The result m is a scalar in the interval -1 to 1 that indicates similarity. A value of 1 indicates identical pixel patterns.
ncc, sad, ssd, isimilarity
Machine Vision Toolbox for MATLAB © 1990-2014 Peter Corke.