Presentation is loading. Please wait.

Presentation is loading. Please wait.

Technion, CS department, SIPC 236327 Spring 2014 Tutorials 12,13 discrete signals and systems 1/39.

Similar presentations


Presentation on theme: "Technion, CS department, SIPC 236327 Spring 2014 Tutorials 12,13 discrete signals and systems 1/39."— Presentation transcript:

1 Technion, CS department, SIPC 236327 Spring 2014 Tutorials 12,13 discrete signals and systems 1/39

2 Discrete LSI system 2/39

3 Discrete LSI system 3/39

4 Example 4/39

5 System is defined with its impulse response Discrete LSI system 5/39

6 Cyclic convolution 6/39 Convolution

7 Q: How can we use this system to calculate a linear convolution? A: Zero padding, and truncation of the result. Exercise 7/39 H Q: If both signals are of length N, how many zeros will we add? A: N-1 zeros

8 Q: How can we use this system to calculate a cyclic convolution? A: Duplicate one signal, and truncation of the result. Exercise 8/39 H Q: If both signals are of length N, how much should we duplicate A: N-1 cells

9 Infinite support ContiniuousContinuous Finite support Discrete Discrete Fourier Transform (DFT, FFT) 9/39

10 התמרות ה DFT ו DFT -1 מתבצעות בדרך הרגילה המקדמים מחזוריים : לכן במקום להתייחס לתחום [0,N-1] בד " כ מסתכלים על התחום [-N/2,N/2-1]. DFT 10/39

11 הפעלת DFT 11/39

12 דוגמאות DFT 12/39

13 Fourier transform – Time domain – non-periodic infinite signals – Continuous time (t) – Continuous frequency (f) – Formulas Summary – Fourier Transforms 13/39

14 DTFT: Discrete Time Fourier Transform – Time domain – non-periodic infinite signals – Discrete time (n) – Continuous frequency (f) – Formulas Summary – Fourier Transforms 14/39

15 Fourier series – Time domain – periodic infinite signals – Continuous time (t) – Discrete frequency (f) – Formulas Summary – Fourier Transforms 15/39

16 DFT or Discrete Time Fourier Series – Time domain – periodic infinite signals – Discrete time (n) – Discrete frequency (f) – Formulas Summary – Fourier Transforms 16/39

17 DFT ומערכת LSI 17/39

18 We have an N-length filter with impulse response h[n]. We create a new filter as follows: Express F[k] with H[k], where H[k]=DFT{h[n]},F[k]=DFT{f[n]} Instructions: calculate Exercise 18/39

19 Noisy image of size 256X256 Im_out[m,n]=Im_in[m,n]+noise[m,n] Harmonic noise: f = 1/(8 pixels) Amplitude A and phase φ are random and independent for each line. Example – discrete frequency filtration 19/39

20 Example – added noise in line 100 20/39

21 Example – discrete frequency filtration 21/39

22 Example – discrete frequency filtration - smoothing 22/39

23 Example – discrete frequency filtration – smoothing vs median (8 pixels) 23/39 No noise but image is blurred

24 DFT of the noise in line i Example – discrete frequency filtration 24/39

25 Design an LSI filter – Such filter multiplies each frequency with a complex number – Can handle each frequency separately In this example, we want to handle frequencies 32 and -32. – Notch filter – attenuates specific frequency Example – discrete frequency filtration 25/39

26 Example – discrete frequency filtration 26/39 Original signal in frequency domain Filtered signal in frequency domain

27 Noise removed completely Original image not fully restored – We cannot restore the attenuated frequencies Example – discrete frequency filtration 27/39

28 Example – discrete frequency filtration 28/39 Smoothing filter of 8 pixels Notch filter

29 Filter in freq. domain: Filter=ones(1,256); Filter(32+1)=0; Filter(224+1)=0; Filtration: For k=1:size(I,1), Y=fft(I(k,:)).*Filter; I(k,:)=ifft(Y); end Example –frequency filtration - implementation 29/39 Notch filter in freq. domain

30 Technion, CS department, SIPC 236327 Spring 2014 Tutorials 12,13 discrete signals and systems Part II: 2D 30/39

31 2D convolution: 2D - definitions 31/39

32 Cyclic 2D-convolution: 2D DFT: 32/39 2D - definitions

33 DFT is linear, we have an operation matrix: 2D-DFT can be implemented as: If the input is separable: 33/39 2D - notes

34 Noisy image 512X512 The noise: Add 100 gray levels for all 16i lines Example 34/39

35 Example 35/39 Noisy image Average filter

36 Example 36/39 Noisy image Average filter

37 How does the noise look like in the frequency domain? Example 37/39

38 Filter implementation in the freq. domain: H=ones(512,512); for n=1:32:512 H(n,1) = H(1,n) = 0; end H(1,1) = 1; Image filtration: out = ifft( fft(img).*H ); Example 38/39 After freq. filtration

39 לפני סינון תדר 39/39

40 לפני סינון תדר (הגדלה של מרכז) 40/39

41 אחרי סינון תדר (הגדלה של מרכז) 41/39

42 Image filtration 42/39

43 Roberts Prewitt Sobel Edge detection of Image A 43/39

44 Edge detection of Image A 44/44 Original Roberts Sobel Prewitt

45 Unsharp masking – edge enhancement 45/44


Download ppt "Technion, CS department, SIPC 236327 Spring 2014 Tutorials 12,13 discrete signals and systems 1/39."

Similar presentations


Ads by Google