# 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

The autocorrelation function is the inverse Fourier Transform of the power spectrum. I have no idea where you got your formula from or what your calculation is meant to be doing. Are you sure that you are reading the book/journal article/application note/website/Wikipedia or whatever correctly?

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.

• Hey, thank you for your answer. I found this formula somewhere on the internet. Its based on Wiener–Khinchin theorem where auto-correlation of one image is multiplication of fft of that image. But, Im getting central peak, and result is symmetric but it looks like values of data is wrong, and that is a reason because I want to check formula first.. – viktor.radovic Jun 25 '12 at 6:22