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!

답변 (1개)
Bjorn Gustavsson
2021년 2월 15일
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
Prabhat Srivastava
2021년 2월 15일
Bjorn Gustavsson
2021년 2월 15일
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
2021년 2월 16일
편집: Bjorn Gustavsson
2021년 2월 16일
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
2021년 2월 17일
Was this the solution to your problem?
Prabhat Srivastava
2021년 2월 17일
카테고리
도움말 센터 및 File Exchange에서 Image Category Classification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
