Average intensity as a function of angle in 2D FFT plot
Mostra commenti meno recenti
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)
Bjorn Gustavsson
il 15 Feb 2021
1 voto
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
Prabhat Srivastava
il 15 Feb 2021
Bjorn Gustavsson
il 15 Feb 2021
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...
Bjorn Gustavsson
il 16 Feb 2021
Modificato: Bjorn Gustavsson
il 16 Feb 2021
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.
Bjorn Gustavsson
il 17 Feb 2021
Was this the solution to your problem?
Prabhat Srivastava
il 17 Feb 2021
Categorie
Scopri di più su Image Category Classification in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
