Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples.

Similar presentations


Presentation on theme: "Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples."— Presentation transcript:

1 Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples

2 2 The Fourier Transform Jean Baptiste Joseph Fourier

3 3 Efficient Data Representation Data can be represented in many ways. There is a great advantage using an appropriate representation. Examples: –Equalizers in Stereo systems. –Noisy points along a line –Color space red/green/blue v.s. Hue/Brightness

4 4 Problem in Frequency Space Original Problem Solution in Frequency Space Solution of Original Problem Relatively easy solution Difficult solution Fourier Transform Inverse Fourier Transform Why do we need representation in the frequency domain?

5 5 How can we enhance such an image?

6 6 Solution: Image Representation 2 1 3 5 8 7 0 3 5 = 1 0 0 0 0 0 2+ 1 0 1 0 0 0 0 0 0 1 0 0 0 + 3 + 5 0 0 0 1 0 0 0 0 0 + +... = 3 + 23 + + 10 + 7 +...

7 7 Transforms 1.Basis Functions. 2.Method for finding the image given the transform coefficients. 3.Method for finding the transform coefficients given the image. U Coordinates V Coordinates X Coordinate Y Coordinate Grayscale Image Transformed Image

8 8 Representation in different bases It is possible to go back and forth between representations: v1v1 v2v2 a u1u1 u2u2

9 9 The Inner Product Discrete vectors (real numbers): Discrete vectors (complex numbers): The vector a H denotes the conjugate transpose of a. Continuous functions:

10 10 The Fourier basis functions Basis Functions are sines and cosines sin(x) cos(2x) sin(4x) The transform coefficients determine the amplitude and phase: a sin(2x)2a sin(2x) -a sin(2x+  )

11 11 3 sin(x) + 1 sin(3x) + 0.8 sin(5x) + 0.4 sin(7x) = A B C D A+B A+B+C A+B+C+D Every function equals a sum of sines and cosines

12 12 Sum of cosines only symmetric functions Sum of sines only antisymmetric functions {{ 

13 13 Using Complex Numbers: cos(kx), sin(kx) C k cos(kx) + S k sin(kx) = R k sin(kx +  k ) f(x) = C 0 + C 1 cos(x) + S 1 sin(x) +... + C k cos(kx) + S k sin(kx) +... Fourier Coefficients e ikx Terms are considered in pairs: C k cos(kx) + S k sin(kx) R e i  e ikx Amplitude+phase

14 14 The inverse Continuous Fourier Transform composes a signal f(x) given F(  ): The 1D Continues Fourier Transform The Continuous Fourier Transform finds the F(  ) given the (cont.) signal f(x): B  (x)=e i2  x is a complex wave function for each (continues) given  F(  ) and f(x) are continues.

15 15 Continuous vs sampled Signals Sampling : Move from f(x) (x  R) to f(x j ) (j  Z) by sampling at equal intervals. f(x 0 ), f(x 0 +  x), f(x 0 +2  x),...., f(x 0 +[n-1]  x), Given N samples at equal intervals, we redefine f as: f(j) = f(x 0 +j  x) j = 0, 1, 2,..., N-1 43214321 43214321 0 0.25 0.5 0.75 1.0 1.250 1 2 3 f(x) f(x 0 ) f(x 0 +  x) f(x 0 +2  x) f(x 0 +3  x) f(j) = f(x 0 + j  x) f(0) f(3) f(2) f(1)

16 16 The discrete basis functions are For frequency k the Fourier coefficient is:

17 17 k = 0, 1, 2,..., N-1 x = 0, 1, 2,..., N-1 The Inverse Discrete Fourier Transform (IDFT) is defined as: Matlab: F=fft(f); Matlab: F=ifft(f); The Discrete Fourier Transform (DFT) Remark: Normalization constant might be different!

18 18 Discrete Fourier Transform - Example F(0) =  f(x) e =  f(x) 1 3 x=0 -2  i0x 4 = (f(0) + f(1) + f(2) + f(3)) = (2+3+4+4) = 13 3 x=0 F(1) =  f(x) e = [2e 0 +3e -i  /2 +4e  i +4e -i3  /2 ] = [-2+i] 3 x=0 -2  ix 4 F(3) =  f(x) e = [2e 0 +3e -i3  /2 +4e  i + 4e -i9  /2 ] = [-2-i] 3 x=0 -6  ix 4 F(2) =  f(x) e = [2e 0 +3e -i  +4e  i + 4e -3  i ] = [-1-0i]= -1 3 x=0 -4  ix 4 DFT of [2 3 4 4] is [ 13 (-2+i) -1 (-2-i) ] f(x) = [2 3 4 4]

19 19 F(k) is the Fourier transform of f(x): f(x) is the inverse Fourier transform of F(k): f(x) and F(k) are a Fourier pair. f(x) is a representation of the signal in the Spatial Domain and F(k) is a representation in the Frequency Domain. The Fourier Transform - Summary

20 20 The Fourier transform F(k) is a function over the complex numbers: –R k tells us how much of frequency k is needed. –  k tells us the shift of the Sine wave with frequency k. Alternatively: –a k tells us how much of cos with frequency k is needed. –b k tells us how much of sin with frequency k is needed.

21 21 x f(x) k RkRk k kk The signal f(x) k Real k Imag Amplitude (spectrum) and Phase Real and Imaginary The Frequency Domain

22 22 R k - is the amplitude of F(k).  k - is the phase of F(k). |R k | 2 =F * (k) F(k) - is the power spectrum of F(k). If a signal f(x) has a lot of fine details |R k | 2 will be high for high k. If the signal f(x) is "smooth" |R k | 2 will be low for high k. 3 sin(x) + 1 sin(3x) + 0.8 sin(5x) + 0.4 sin(7x) =

23 DEMO 23

24 24 Examples: Let Fourier  x f(x) R    Real  Imag The Delta Function: 0

25 25 Let Fourier  x f(x) R    Real  Imag The Constant Function: 0 0 0

26 26 Let Fourier  x f(x) R    Real  Imag A Basis Function: 0 00 00

27 27 Let x  R   f(x) Fourier 00 -0-0  Real  Imag 00 -0-0 The Cosine wave:

28 28 Let x  RR   f(x) Fourier 00 -0-0  /2  Real  Imag 00 -0-0 The Sine wave: -  /2

29 29 Let x f(x) Fourier RR  The Window Function (rect): -0.5 0.5

30 30 Proof: f(x) = rect 1/2 (x) = { 1 |x|  1/2 0 otherwise 1 -1/21/2 sinc(  )  F(  )

31 31 Let x f(x) Fourier RR  The Gaussian:

32 32 Let x f(x) Fourier RR  The Comb Function: c k (x) C 1/k (  )

33 33 Properties of The Fourier Transform Linearity: Distributive (additivity): DC (average): Symmetric: If f(x) is real then,

34 34 x f(x)  |F(  )| x g(x)  |G(  )| x f+g  |F(  )+G(  )| Distributive:

35 35 Transformations Translation: The Fourier Spectrum remains unchanged under translation: Scaling:

36 050100 0 0.2 0.4 0.6 0.8 1 050100 0 0.2 0.4 0.6 0.8 1 050100 -15 -10 -5 0 5 10 050100 -15 -10 -5 0 5 10 050100 -15 -10 -5 0 5 10 050100 -15 -10 -5 0 5 10 050100 0 2 4 6 8 10 050100 0 2 4 6 8 10 050100 -15 -10 -5 0 5 10 050100 -15 -10 -5 0 5 10 050100 -15 -10 -5 0 5 10 Example - Translation 1D Image Translated real(F(u))imag(F(u))|F(u)| Differences:

37 37 x f(x)  |F(  )| x f(x)  |F(  )| Change of Scale- 1D: x f(x)  |F(  )|

38 38 x f(x)  F(  ) x f(2x)  0.5 F(  /2) Change of Scale x f(x/2)  2 F(2  )


Download ppt "Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples."

Similar presentations


Ads by Google