I computed the acf of an image with the following code:
%# read in image
Img = imread('myImage.tif');
% get size of image
[N, M] = size(Img);
%# convert to double
I = double(Img);
%# subtract mean
I = I-mean(I(:));
%# normalize magnitude
I = I/sqrt(sum(I(:).^2));
%# compute acf
fft_I = fft2(I);
Acf = real(fftshift(ifft2(fft_I.*conj(fft_I))));
Now, i have to mathematically describe the procedure, and I am thinking that the FFT equation given in https://uk.mathworks.com/help/matlab/ref/fft2.html (scroll to the bottom) isn't enough?
Can someone please help me out here. Many thanks.
EDIT:
Please find the added mathematical description i have come up with and kindly help me verify its correctness.