Normalized cross correlation image processing example. This will give you the correlation, and it is fast.