1 / 46

DREAM

DREAM. IDEA. PLAN. IMPLEMENTATION. Introduction to Image Processing. Present to: Amirkabir University of Technology (Tehran Polytechnic) & Semnan University. Dr. Kourosh Kiani Email: kkiani2004@yahoo.com Email: Kourosh.kiani@aut.ac.ir Email : Kourosh.kiani@semnan.ac.ir

beata
Download Presentation

DREAM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DREAM IDEA PLAN IMPLEMENTATION

  2. Introduction to Image Processing Present to:Amirkabir University of Technology (Tehran Polytechnic) & Semnan University Dr. Kourosh Kiani Email: kkiani2004@yahoo.com Email: Kourosh.kiani@aut.ac.ir Email: Kourosh.kiani@semnan.ac.ir Web: www.kouroshkiani.com

  3. Lecture 09 Discrete Fourier Transform (DFT) of 1D signal

  4. Discrete Time Periodic Signals Definition: A discrete time signal x[n] is periodic with period N if and only if for all n . Meaning: a periodic signal keeps repeating itself forever!

  5. Example: a Sinusoid Consider the Sinusoid: It is periodic with period since for all n.

  6. General Periodic Sinusoid Consider a Sinusoid of the form: with k, N integers. It is periodic with period N since for all n.

  7. Example of Periodic Sinusoid Consider the sinusoid: We can write it as: It is periodic with period since for all n.

  8. Periodic Complex Exponentials Consider a Complex Exponential of the form: It is periodic with period N since for all n.

  9. Example of a Periodic Complex Exponential Consider the Complex Exponential: We can write it as and it is periodic with period N = 20.

  10. Reference Frames Goal: We want to write all discrete time periodic signals in terms of a common set of “reference signals”. • It is like the problem of representing a vector in a reference frame defined by • an origin “0” • reference vectors Reference Frame

  11. Reference Frames in the Plane and in Space For example in the plane we need two reference vectors Reference Frame … while in space we need three reference vectors Reference Frame

  12. A Reference Frame in the Plane If the reference vectors have unit length and they are perpendicular (orthogonal)to each other, then it is very simple: Where projection of along projection of along The plane is a 2 dimensional space.

  13. A Reference Frame in the Space If the reference vectors have unit length and they are perpendicular (orthogonal)to each other, then it is very simple: Where projection of along projection of along projection of along The “space” is a 3 dimensional space.

  14. N E Example: where am I ? Point “x” is 300m East and 200m North of point “0”.

  15. Reference Frames for Signals We want to expand a generic signal into the sum of reference signals. The reference signals can be, for example, sinusoids or complex exponentials reference signals

  16. Back to Periodic Signals A periodic signal x[n] with period N can be expanded in terms of N complex exponentials as

  17. A Simple Example Take the periodic signal x[n] shown below: Notice that it is periodic with period N=2. Then the reference signals are We can easily verify that (try to believe!): for all n.

  18. Another Simple Example Take another periodic signal x[n] with the same period (N=2): Then the reference signals are the same We can easily verify that (again try to believe!): for all n. Same reference signals, just different coefficients

  19. Orthogonal Reference Signals Notice that, given any N, the reference signals are all orthogonal to each other, in the sense Since by the geometric sum

  20. … apply it to the signal representation … and we can compute the coefficients. Call then

  21. Discrete Fourier Series Given a periodic signal x[n] with period N we define the Discrete Fourier Series (DFS) as Since x[n] is periodic, we can sum over any period. The general definition of Discrete Fourier Series (DFS) is for any

  22. Inverse Discrete Fourier Series The inverse operation is called Inverse Discrete Fourier Series (IDFS), defined as

  23. Revisit the Simple Example Recall the periodic signal x[n] shown below, with period N=2: Then Therefore we can write the sequence as

  24. Example of Discrete Fourier Series Consider this periodic signal The period is N=10. We compute the Discrete Fourier Series

  25. … now plot the values …

  26. Example of DFS Compute the DFS of the periodic signal Compute a few values of the sequence and we see the period is N=2. Then which yields

  27. Signals of Finite Length All signals we collect in experiments have finite length Example: we have 30ms of data sampled at 20kHz (ie 20,000 samples/sec). Then we have

  28. Series Expansion of Finite Data We want to determine a series expansion of a data set of length N. Very easy: just look at the data as one period of a periodic sequence with period N and use the DFS:

  29. Discrete Fourier Transform (DFT) Given a finite interval of a data set of length N, we define the Discrete Fourier Transform (DFT) with the same expression as the Discrete Fourier Series (DFS): And its inverse

  30. Signals of Finite Length All signals we collect in experiments have finite length in time Example: we have 30ms of data sampled at 20kHz (ie 20,000 samples/sec). Then we have

  31. Series Expansion of Finite Data We want to determine a series expansion of a data set of length N. Very easy: just look at the data as one period of a periodic sequence with period N and use the DFS:

  32. Discrete Fourier Transform (DFT) Given a finite of a data set of length N we define the Discrete Fourier Transform (DFT) with the same expression as the Discrete Fourier Series (DFS): and its inverse

  33. Example of Discrete Fourier Transform Consider this signal The length is N=10. We compute the Discrete Fourier Transform

  34. … now plot the values …

  35. Fs = 1000; % Sampling frequency T = 1/Fs; % Sample time L = 1000; % Length of signal t = (0:L-1)*T; % Time vector % Sum of a 50 Hz sinusoid and a 120 Hz sinusoid x = 0.7*sin(2*pi*50*t) + sin(2*pi*120*t); y = x + 2*randn(size(t)); % Sinusoids plus noise figure (1); plot(Fs*t(1:50),y(1:50)) title('Signal Corrupted with Zero-Mean Random Noise') xlabel('time (milliseconds)')

  36. NFFT = 2^nextpow2(L); % Next power of 2 from length of y Y = fft(y,NFFT)/L; f = Fs/2*linspace(0,1,NFFT/2+1); figure (2); % Plot single-sided amplitude spectrum. plot(f,2*abs(Y(1:NFFT/2+1))) title('Single-Sided Amplitude Spectrum of y(t)') xlabel('Frequency (Hz)') ylabel('|Y(f)|')

  37. Relation Between Dx and Du For a signal f(x) withMpoints, let spatial resolution Dx be space between samples in f(x) and let frequency resolutionDu be space between frequencies components in F(u), we have Example: for a signal f(x) with sampling period 0.5 sec, 100 point, we will get frequency resolution equal to This means that in F(u) we can distinguish 2 frequencies that are apart by 0.02 Hertz or more.

  38. m = 4; n = 2^m-1; x = gf(randi([0 2^m-1],n,1),m); % Random vector y = fft(x); % Transform of x z = ifft(y); % Inverse transform of y ck = isequal(z,x) % Check that ifft(fft(x)) recovers x. [x z]= 5 5 2 2 3 3 0 0 14 14 12 12 5 5 13 13 12 12 9 9 6 6 5 5 1 1 5 5 8 8

  39. Example in Matlab >> a=[1 2 3 4 5 6] a = 1 2 3 4 5 6 >> b=fft(a') b= 21.0000 -3.0000 + 5.1962i -3.0000 + 1.7321i -3.0000 -3.0000 - 1.7321i -3.0000 - 5.1962i >> c=ifft(b); >> a=c' a = 1.0000 2.0000 3.0000 4.0000 5.0000 6.0000

  40. Periodicity of 1-D DFT From DFT: -N 2N N 0 We display only in this range DFT repeats itself every N points (Period = N) but we usually display it for n = 0 ,…, N-1

  41. Conventional Display for 1-D DFT f(x) DFT N-1 N-1 0 0 Time Domain Signal High frequency area Low frequency area The graph F(u) is not easy to understand !

  42. Conventional Display for DFT : FFT Shift FFT Shift: Shift center of the graph F(u) to 0to get better Display which is easier to understand. N-1 0 High frequency area Low frequency area -N/2 N/2-1 0

  43. y=rand(1024,1); z=fft(y) subplot(2,1,1) plot(abs(z)) title('FFT') w=fftshift(z) subplot(2,1,2) plot(abs(w)) title('FFTHIFT')

  44. Questions? Discussion? Suggestions ?

  45. Thank you

More Related