Understanding the Image output in Frequency Domain

AI Thread Summary
Understanding the frequency distribution in the FFT of an image can be challenging, as it differs from analyzing simple sine or cosine waves. When performing a 2D FFT on an image, the output represents various frequency components, which can be visualized using functions like fftshift. The example provided demonstrates how to interpret the FFT output of a simple binary image, revealing that the frequency representation may not be as straightforward as with sinusoidal signals. To effectively determine frequencies and amplitudes in image data, one must consider the spatial frequency content and how it relates to the image's structure. Clarification on visualizing and interpreting these frequencies in the context of images is essential for a deeper understanding.
XuFyaN
Messages
49
Reaction score
0
I need help understanding how frequencies are distributed when taking the FFT of an Image and how can i determine those frequencies, I really need a detailed and easy tutorial with practical example to understand it.

When we take the FFT of a Sine/Cos wave we can easily see its frequencies in FFT, here is my example i added comments in detail to understand,

Code:
%Matlab Code,
 
f=1e3;   %Frequency of Wave -> 1KHz
A=4;    %Amplitude
Fs = 1e6;  %Sampling Frequency
Ts = 1/Fs;   %Sampling Rate
t = 10/f;       %Time period of 10 Oscillation
n = 0:Ts:t;  %Generating Samples
% (1/f)/T = 1000 %Length for 1 Oscillation after Sampling
% So Length of the Signal for 10 Oscillations is 10,000
x=A*sin(2*pi*f*n);
subplot(2,1 ,1);
plot(n,x);
% 100,000/10,000 = 100Hz <- First point = 100Hz
% 2nd Point = 200Hz
% 3rd Point = 300Hz
% 4th Point = 400Hz
% .
% .
% 10th Point = 1KHz <- Original Signal Frequency
subplot(2,1 ,2);
F=fft(x);
plot(2*abs(F)./(t/Ts));
xlim ([0 100])    % 0 = 100 , 1 = 200...10=1000...100 = 10,000
set(gca, 'XTickLabel', ((get(gca,'XTick')))*100)
xlabel ('Frequency in Hz')

and here is the output image,
untitled.jpg


See how easily I can see the frequency of actual signal in Frequency domain, this is because i knew that the original frequency was 1KHz.

but in case of Images, what are the frequencies ?

here is the simple code,

Code:
image = [0 0 0 0 1 1 1 1]
The above discrete signal has 8 points so N = 8 How can i determine the frequencies and amplitude of this signal ? just like i did above for Sine wave

If i take its FFT and display it ,


Code:
f = fft2(image) 
imshow(fftshift(f)); % plotting

Untitled.png


it is nothing but 3-colors the middle one is white. (as expected)
I've no idea what does that output mean , how could i understand what are the frequencies in the image from this output ?

Can somebody explain me just one example of image FFT and how to determine the frequency etc like i did above in case of Sine wave?
 
Last edited:
Engineering news on Phys.org
your output image isn't showing


Dave
 
davenn said:
your output image isn't showing


Dave

here they are,

http://s7.postimage.org/bprquwfuh/untitled.jpg

http://s15.postimage.org/qshnzwfnt/Untitled.png

are they visible now ?
 
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Thread 'Beauty of old electrical and measuring things, etc.'
Even as a kid, I saw beauty in old devices. That made me want to understand how they worked. I had lots of old things that I keep and now reviving. Old things need to work to see the beauty. Here's what I've done so far. Two views of the gadgets shelves and my small work space: Here's a close up look at the meters, gauges and other measuring things: This is what I think of as surface-mount electrical components and wiring. The components are very old and shows how...
Back
Top