Average intensity as a function of angle in 2D FFT plot

Hi
I have a 2D FFT spectrum plot of an image which looks like as shown in the image. I want to get the average value of amplitudes as a function of angle(0 to 360) around the center.
How do i go about it? I tried to convert it into polar coordinate but I am not sure how is it being converted!

Risposte (1)

This is kind-of-difficult in practice. Your fft has low-wavenumber components at [0,0], [1,0], [-1, 0], [0,1], [0,-1] and if we include the components with norm 2^(1/2) at [1,1], [-1,1], [-1,-1] and [1,-1]. The non-DC components are at 0, 90, 180 and 270 degrees angle, and then 45, 135, 225, and 315 degrees. It is not at all clear to me that you can trivially interpolate between these Fourier-components. What I suggest is that you rotate your image with imrotate, and then do the fft and extract the horizontal and vertical components from those ffts to get the angular variation. By doing that it is at least clear what interpolation-effects are introduced.
HTH

5 Commenti

Rotating and taking fft is one way, however I believe there must be some efficient way to do it. I have around 50 images which have similar FFTs with varying patterns(the distinct peaks are at different angles). What i want is something like this for every image:
Yeah, this is a problem that "should have a neat solution". After all we have the central slice theorem and all for the continuous FT...
Perhaps the easiest way to go about this is to use the central-slice-theorem. Take the 1-D fft (in the l-direction) of the Radon-transform of your images. That should be a not too bad answer I think. You better compare that with the rotate-and-transform-and-cut idea for one-two images...
Here's how to do this:
clf
subplot(2,2,1)
imagesc
imK = get(get(gca,'Children'),'CData'); % get a default image
% then we add some periodic noises
[u,v] = meshgrid(1:64);
imK2 = imK + ( 3*sin(2*pi*u/5+2*pi*v/8) + ...
2*sin(2*pi*u/exp(1)+2*pi*v/2^1.5) +...
2*sin(2*pi*u/8-2*pi*v/4) );
% Calculate the radon-transform of the noisy image
rK2 = radon(imK2,0:180);
subplot(2,2,2)
imagesc(rK2)
subplot(2,2,4)
% look at the 1-D fft of the radon-transdform
imagesc(log10(abs(fftshift(fft(rK2),1))))
subplot(2,2,3)
r = (1:size(rK,1))-48;
theta = 0:180;
[theta,r] = meshgrid(theta,r);
pcolor(r.*cos(theta*pi/180),r.*sin(theta*pi/180),log10(abs(fftshift(fft(rK2),1)))),shading flat
Then you can compare with the 2-D FT of the image
subplot(2,2,1)
imagesc(log10(abs(fftshift(fft2(imK2)))))
There will be some spectral leakage, because somewhere in the processing (the radon-transform) we have gone from discrete sampling at integer pixel-coordinates to spatially realistic pixels). Then by taking the intensities along the columns of the FT of the RT of the image you'll get as good an estimate of the angular variation of the Fourier components.
Was this the solution to your problem?
HI Bjourn
Thank you for the help. But I didn't do it in matlab. I did it in imageJ, and just took the average intensity at some required angle.
Thank you once again.

Accedi per commentare.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by