Presentation is loading. Please wait.

Presentation is loading. Please wait.

Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial ---------------------  Transformed domain Transformation.

Similar presentations


Presentation on theme: "Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial ---------------------  Transformed domain Transformation."— Presentation transcript:

1 Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial ---------------------  Transformed domain Transformation domain Fourier, DCT  Image and Transformed image Spatial ---------------------  Transformed domain Transformation domain h(x,y) Fourier, DCT F(u,v)  Processing in the transformed domain : u Filtering, Compression, Description  Fourier transform : 1807 Fourier u any periodic signal can be represented as a weighted sum of sinusoids

2 Practical Image Processing2

3 3 spatial frequency of an image refers to the rate at which pixel intensities change

4 Practical Image Processing4 H(u,v); u : spatial frequency along x axis u : spatial frequency along x axis v : spatial frequency along y axis v : spatial frequency along y axis

5 Practical Image Processing5  Discrete Fourier Transform (DFT) u let h(x,y) be an M x N image  Inverse Discrete Fourier Transform(IDFT)

6 Practical Image Processing6 Sample code for DFT input : double h[M][N] output : COMPLEX H[M][N] for (u=0; u<M; u++) for (v=0; v<N; v++) { sum_re = 0; sum_im = 0; cu = 2*3.14159*u/M; cv=2*3.14159*v/N; for (x=0; x<M; x++) for (y=0; y<N; y++) { theta = x*cu + y*cv; sum_re += h[x][y] * cos(theta); sum_im -= h[x][y] * sin(theta); } H[u][v].re = sum_re; H[u][v].im = sum_im; } struct { double re; double im; } COMPLEX;

7 Practical Image Processing7 u DFT expects input to be periodic

8 Practical Image Processing8  Gibbs phenomenon u ringing effect caused by sampling & truncation u can reduce width of ringing by increasing the number of data samples u amplitude of ringing is proportional to difference between amplitude of first and last sample F can reduce it by multiplying data by windowing function skip

9 Practical Image Processing9 skip

10 Practical Image Processing10 window functions attenuate values at truncation edges

11 Practical Image Processing11  Fast Fourier transform u for NxN image, time complexity of DFT is O(N 4 ) u fast algorithm : Bell lab 1965 u adopt divide and conquer technique for fast computation : O(N 2 logN) 19 hours  4.8 sec : table 7.2 u dimension of image must be powers of 2 F expand to legal size by zero-padding

12 Practical Image Processing12 (1) bit-reversal operation : skip

13 Practical Image Processing13 skip F exploit periodicity and symmetry of recursive DFT computation F swap data elements for in-place computation u butterflies operation F divide set of data points down and perform series of 2 points DFT

14 Practical Image Processing14  how to display frequency data u 1 pixel range : 1 cycle small u, v : low frequency u logarithmic transform : wide dynamic range D(u,v) = c log(1+|H(u,v)|) u unordered vs ordered display(centering) I IVIII IIIV III III

15 Practical Image Processing15

16 Practical Image Processing16 Magnitude only + Phase

17 Practical Image Processing17

18 Practical Image Processing18 Fourier, Logarithmic Partial Inverse Fourier

19 Practical Image Processing19

20 Practical Image Processing20

21 Practical Image Processing21 Filtering in Frequency Domain  convolution in spatial domain == multiplication in frequency domain u transform into frequency domain by FFT F f(x, y)  F(u, v). pgm : list 7.1 u multiply by filtering mask in frequency domain F G(u, v) = H(u, v) F(u, v). pgm : list 7.2 F H(u, v) : filter u transform back to spatial domain by IFFT F G(u, v)  g(x, y)

22 Practical Image Processing22 F(u,v) f(x,y) H(u,v) H(u,v)F(u,v) g(x,y)

23 Practical Image Processing23 Ideal Filters  filters : low-pass, high-pass, band-pass, band- stop  ideal filter : pass, not-pass style

24 Practical Image Processing24 Ideal Low Pass Filter

25 Practical Image Processing25 Ideal Low Pass Filter : Example Input image 500x500 H(u,v) with D 0 : 5, 15, 30, 80, 230 D 0 = 5 D 0 = 30 D 0 = 230 D 0 = 80 D 0 = 15 Ringing 현상 나타남

26 Practical Image Processing26 Practical Low Pass Filter : Butterworth  ideal filters cause blurring & ringing in spatial domain  use Butterworth filter for smooth frequency response  Low Pass Filter : (== blurring, smoothing mask) D 0 : cutoff frequency n : order

27 Practical Image Processing27 Butterworth Low Pass Filter : Example Input image 500x500 H(u,v) with D 0 : 5, 15, 30, 80, 230 D 0 = 5 D 0 = 30 D 0 = 230 D 0 = 80 D 0 = 15 Ringing 현상 안 나타남

28 Practical Image Processing28

29 Practical Image Processing29 D 0 = 1/3 D 0 = 1/2 Ideal lowpass filters

30 Practical Image Processing30 D 0 = 1/3 D 0 = 1/2 ideal Butterworth

31 Practical Image Processing31 Ideal High Pass Filter

32 Practical Image Processing32 Ideal High Pass Filter : Example IHPF D 0 = 15 IHPF D 0 = 30 IHPF D 0 = 80 Input Image 500 x 500

33 Practical Image Processing33 ButterWorth HPF The Butterworth high pass filter is given as: where n is the order and D 0 is the cut off distance as before

34 Practical Image Processing34 Butterworth HPF : Example D 0 = 15D 0 = 30D 0 = 80

35 Practical Image Processing35  High Pass Filter : sharpening  Band Pass Filter u pass specific frequency component only W : bandwidth, D 0 : center freqency

36 Practical Image Processing36 Discrete Cosine Transform(DCT)  produce real frequency coefficients  fast : pgm list 7.2, 7.3  used for image compression : JPEG, MPEG


Download ppt "Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial ---------------------  Transformed domain Transformation."

Similar presentations


Ads by Google