I'm using MATLAB's fft2
to generate the fourier power spectrum of an image. Naturally the spectrum is two dimensional as well, showing the direction of the direction and the frequency of the spectral components. I'd like to get rid of the directional component and just look at the frequency, i.e. reduce the dimension of the spectrum by one.
The way I see it, one can either:
- sum over a ring containing all pixels with $$ r_1 \leq \sqrt{x^2 + y^2} \leq r_2 $$ (which would make it tricky to select the correct boundary radii to really count the pixels that correspond to a certain frequency)
- or one can convert the image to a polar coordinate system and sum over the axis corresponding to the radial component of the matrix.
I wonder which method would be preferrable and for what reasons and what normalization I would have to make (of course, for the first method, there would be much less pixels contained in the ring element for lower frequencies than for higher frequencies and I guess some similar scaling problem will occur for the second method)