Two-dimensional correlation
Example
A=
B=
The order of the input matrix is: