Cross correlation coefficient for 2 matrices (two 2d arrays)

287 Views Asked by At

I'm trying to manually calculate cross correlation coefficient for 2 matrices. But I'm not sure how to apply the formula and how it works. Here are my example matrices:

Matrix 1 Matrix 2

Any help would be greatly appreciated. Behrouz

P.S. As you know, this method is used in 'template matching' in computer vision.