# Why the difference come of 2D Fourier Transforms from two similar image?

Here is two similar images. I did 2D Fourier Transform for both of them. But for the first image, the result shows as a ring and for the second image the 2D FFT shows as a-two-ring. Examples R listed in the following.

Input image 1 : (For this figure the FFT is a ring.)

Input image 2: (For this figure the FFT is a two-ring.)

Could someone explain the results in the view of Fourier Transform quantitatively? Maybe from the basic theory and calculation of Fourier Transform? Maybe introduction of the auto-correlation function? Any other suggestions are welcomed.

• Do you understand how to interpret the spectrum; radius = frequency etc? Oct 9, 2015 at 14:32
• In my view, one ring in FFT means in original image there is a certain regular distance and orginal image is isotropic....so in the two ring case it might be the reslut of two different regular distances in original image...But in figure 2, I can not find out obvious single supporting the hypothesis..
– Cici
Oct 9, 2015 at 14:41
• The two rings are actually quite close in wavelength, outer ring maybe 4 pixels, inner ring maybe 8 pixels. To see what they correspond to, zero the rest of the spectrum and then do the IFFT, for each ring. Oct 9, 2015 at 14:49
• Actually I am new in matlab or mathmatica...I only know a little about the FFT and programming...I will try iFFT later..But another question comes here...Two-ring in the FFT can be simply divided into the superposition of the bigger ring and smaller ring?
– Cici
Oct 9, 2015 at 14:59
• Yes, that is why FFT is so commonly used, it is all linear. Each point in in the spectrum represents the amplitude and phase of a sinusois at a particular frequency and orientation. Add all those sinusoids together and you get the original image. Add only a subsection together you get a filtered image. If you link to the original files I can write some code to demonstrate. Oct 10, 2015 at 0:03

Here is some code that will let you interactively make a mask and see the difference.

For the first image the dark edges and the bright centres are about the same width, so there is only one ring. For the second image, the dark edges are half the size of the bright centres, hence two rings.

I1 = imread('sefft1.jpg');

I1g = rgb2gray(I1);
I2g = rgb2gray(I2);

I1gFFT = fft2(I1g);
I2gFFT = fft2(I2g);

imagesc(log(abs(fftshift(I1gFFT))))
imagesc(log(abs(fftshift(I2gFFT))))

% FFT coordinates
[rows,cols] = size(I1gFFT);

[ux, uy] = meshgrid(([1:cols]-(fix(cols/2)+1))/(cols-mod(cols,2)), ...
([1:rows]-(fix(rows/2)+1))/(rows-mod(rows,2)));
ux = ifftshift(ux);   % Quadrant shift to put 0 frequency at the corners
uy = ifftshift(uy);

% Convert to polar coordinates
th = atan2(uy,ux);
r = sqrt(ux.^2 + uy.^2);

% Centred versions
rc = fftshift(r);
thc = fftshift(th);

% Interactive selection of filter
imagesc(log(abs(fftshift(I1gFFT))));
title('Image 1: Press enter to select max and min freq');
pause;
title('select max and min freq');
[x,y] = ginput(2);
y = round(y)
x = round(x)
r1 = rc(y(1),x(1));
r2 = rc(y(2),x(2));
rmin = min(r1,r2);
rmax = max(r1,r2);
mask = (r > rmin) & (r < rmax);
maskc = (rc > rmin) & (rc < rmax);

% Interactive selection of filter
imagesc(log(abs(fftshift(I2gFFT))));
title('Image 2: Press enter to select max and min freq');
pause;
title('select max and min freq')
[x,y] = ginput(2);
y = round(y)
x = round(x)
r1 = rc(y(1),x(1));
r2 = rc(y(2),x(2));
rmin = min(r1,r2);
rmax = max(r1,r2);
mask = (r > rmin) & (r < rmax);
maskc = (rc > rmin) & (rc < rmax);