# Autocorrelation of power spectrum

Anyone have an idea of how I can implement autocorrelation of power spectrum of one image? I tried using:

 autocorrel = ifft( | fft(power spectrum) | ^ 2 );


but it's not working. Do you have any idea why or some other way?

• In what way is it not working? Are you sure you want the autocorrelation of the power spectrum, or do you want the autocorrelation of the image itself? – Jason R Jun 22 '12 at 13:49

In any case, if you want to compute an autocorrelation as an ifft, you should be careful about making sure that the power spectrum vector is set up right. If the autocorrelation function that you compute as the iffy does not have a peak at the origin (or as the first entry in the vector for MATLABi folks) and have the symmetry property $R[i] = R[-i]$ in real life and the appropriately translated version in MATLAB, something is awry.