Mathematics, Fourier Transform, Image Processing, Numpy.
once to get the Fourier transform of cross correlation We can apply the inverse discrete Fourier transform to recover the row. In the end, we check each n to find the maximum. Only 1D version is presented above but 2D is quite similar. The time complexity is O(MlogM) due to the magic of fast