Dependence of $\tt n$ in $\tt fft(data,n)$ in auto correlation of data
Doing an $N \times M$ point FFT for that sized image to calculate the autocorrelation will result in time-aliasing. 

To multiply two signals of length $N$ in the frequency domain, the FFT length must be $2N-1$.