Assume the following:

img = 255*rand(512); %Generating a 2D matrix with random numbers between 0 to 255.

2D matrix with random values

fftimg = abs(fft2(img)); %FFT of the image.

FFT of the above image

The frequency transform of this image is a single high value at the top left corner of the image. This means the 'energy' or the frequency response is the highest and concentrated at the lowest frequency

Can you explain why this happens?


1 Answer 1


That is the DC offset (at zero frequency).

img = 255*randn(512);  % thanks @Jason's comment
fftimg = abs(fft2(img1));

gives you the spectrum of the normal distribution image. Note that white noise is flat in the frequency domain, but the Gaussian noise in the time domain is still Gaussian in the frequency domain. You may need to average a large number of FFTs of white noise to approach the average power spectral density.

  • $\begingroup$ I saw the frequency transform and it appears as random as the original image. Why is that? What does it mean? I did not observe any spectrum as such. $\endgroup$ Feb 27, 2014 at 5:12
  • $\begingroup$ answer updated, thx $\endgroup$
    – lennon310
    Feb 27, 2014 at 5:36
  • $\begingroup$ I agree, with all you are saying, but I want to understand how to deduce the image frequency transform by looking at a simple image. I tried the same using randn and I observe the same noise pattern in my frequency transform. $\endgroup$ Feb 27, 2014 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.