Presentation is loading. Please wait.

Presentation is loading. Please wait.

M. Wu: ENEE631 Digital Image Processing (Spring'09) Fourier Transform and Spatial Filtering Spring ’09 Instructor: Min Wu Electrical and Computer Engineering.

Similar presentations


Presentation on theme: "M. Wu: ENEE631 Digital Image Processing (Spring'09) Fourier Transform and Spatial Filtering Spring ’09 Instructor: Min Wu Electrical and Computer Engineering."— Presentation transcript:

1 M. Wu: ENEE631 Digital Image Processing (Spring'09) Fourier Transform and Spatial Filtering Spring ’09 Instructor: Min Wu Electrical and Computer Engineering Department University of Maryland, College Park   bb.eng.umd.edu (select ENEE631 S’09)   minwu@eng.umd.edu ENEE631 Spring’09 Lecture 5 (2/9/2009)

2 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [2] Overview Last Time: –Dithering and Halftoning –2-D signals and systems Today –2-D Linear Shift-Invariant (LSI) Systems –2-D Fourier Transform –Image Enhancement via Spatial Filtering UMCP ENEE631 Slides (created by M.Wu © 2004)

3 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [3] Separability x[n 1,n 2 ] is called a separable signal if it can be expressed as x[n 1,n 2 ] = f[n 2 ]  g[n 1 ] –In matrix notation of the image X, an separable image can be represented by the outer product of two column vectors: X = f  g T –E.g. the impulse signal is separable:  [n 1,n 2 ] =  [n 1 ]   [n 2 ] Separable signals form a special class of multi-dimensional signals –Consider indices range: 0  n 1  N 1  1, 0  n 2  N 2  1 –A general 2-D signal x[n 1,n 2 ] has N 1  N 2 degrees of freedom –A separable signal has only N 1 + N 2  1 degrees of freedom UMCP ENEE631 Slides (created by M.Wu © 2004) = *

4 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [4] Review and Clarify (1): Separability x[n 1,n 2 ] is called a separable signal if it can be expressed as x[n 1,n 2 ] = f[n 2 ]  g[n 1 ] –In matrix notation of the image X, an separable image can be represented by the outer product of two column vectors: X = f  g T –E.g. the impulse signal is separable:  [n 1,n 2 ] =  [n 1 ]   [n 2 ] Separable signals form a special class of multi-dimensional signals –Consider indices range: 0  n 1  N 1  1, 0  n 2  N 2  1 –A general 2-D signal x[n 1,n 2 ] has N 1  N 2 degrees of freedom –A separable signal has only N 1 + N 2  1 degrees of freedom UMCP ENEE631 Slides (created by M.Wu © 2004) = *

5 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [5] Periodicity of 2-D Discrete Signal x[n 1,n 2 ] is (rectangular) periodic with a (positive integer- valued) period T 1 -by- T 2 at rectangular repetition grid if x[n 1,n 2 ] = x[n 1 +T 1, n 2 ] = x[n 1, n 2 +T 2 ] for  integers (n 1, n 2 ) –Interpreting the conditions: periodic tiling of column and row strips => tiling a basic rectangular shaped cell over a rectangular grid Example: cos[  n 1 /2 +  n 2 ] is periodic with a period 4-by-2 –Is cos[ n1 + n2 ] periodic? –Periodicity of continuous vs discrete signal: sampled version of two- variable sinusoids are generally not periodic, unless periods are integers. How about tiling of a non-rectangular cell or at a non- rectangular grid? => More general periodicity UMCP ENEE631 Slides (created by M.Wu © 2004)

6 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [6] (2) Periodicity of 2-D Discrete Signal x[n 1,n 2 ] is (rectangular) periodic with a (positive integer- valued) period T 1 -by- T 2 at rectangular repetition grid if x[n 1,n 2 ] = x[n 1 +T 1, n 2 ] = x[n 1, n 2 +T 2 ] for  integers (n 1, n 2 ) –Interpreting the conditions: periodic tiling of column and row strips => tiling a basic rectangular shaped cell over a rectangular grid Example: cos[  n 1 /2 +  n 2 ] is periodic with a period 4-by-2 –Is cos[ n1 + n2 ] periodic? –Periodicity of continuous vs discrete signal: sampled version of two- variable sinusoids are generally not periodic, unless periods are integers. How about tiling of a non-rectangular cell or at a non- rectangular grid? => More general periodicity UMCP ENEE631 Slides (created by M.Wu © 2004)

7 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [7] More General 2-D Periodicity x[n 1,n 2 ] is general periodic with two integer period vectors N 1 -by- N 2 if for  integers (n 1, n 2 ) we have x[n 1,n 2 ] = x[n 1 +N 11, n 2 +N 21 ] i.e. x[ n + N 1 ] = x[n 1 +N 12, n 2 +N 22 ] i.e. x[ n + N 2 ] –Periodic tiling of a cell enclosed by N 1 and N 2. –Linearly independent period vectors: det(N 1, N 2 )  0 –Rectangular periodicity occurs when matrix [N 1 N 2 ] is diagonal. Will revisit such non-rectangular tiling in “lattice sampling” and texture analysis UMCP ENEE631 Slides (created by M.Wu © 2004)

8 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [8] Review: Characterizing 2-D System A 2-D system often refers to a system that maps a 2-D input signals to a 2-D output signal –Such as system can be represented by y[n 1,n 2 ] = H ( x[n 1,n 2 ] ) Linear system H( ) : for all a, b, x1[ ], x2[ ] H (a  x 1 [n 1,n 2 ] + b  x 2 [n 1,n 2 ]) = a  H (x 1 [n 1,n 2 ]) + b  H (x 2 [n 1,n 2 ]) Impulse responses: h(m,n; m’,n’) = H (  [m-m’, n-n’] ) is the output at location (m,n) in response to a unit impulse at (m’,n’) => Point Spread Function (PSF): impulse response for system with positive inputs & outputs (such as intensity of light in imaging system) A linear sys can be characterized by its impulse responses UMCP ENEE631 Slides (created by M.Wu © 2004)

9 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [9] Shift Invariance Shift invariance: If H (x[m, n]) = y[m,n], then H ( x[m - m 0, n - n 0 ] ) = y[m - m 0, n - n 0 ] Impulse response for Linear Shift-Invariant (LSI) System –A function of the two displacement index variable only: h(m,n; m’,n’) = h[ m-m’, n-n’] i.e. the shape of the impulse response does not change as the input impulse move in the (m,n) plane I/O relation for a LSI system: –Equal to the convolution of the input with an impulse response UMCP ENEE631 Slides (created by M.Wu © 2004)

10 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [10] Shift Invariance Shift invariance: If H (x[m, n]) = y[m,n], then H ( x[m - m 0, n - n 0 ] ) = y[m - m 0, n - n 0 ] Impulse response for Linear Shift-Invariant (LSI) System –A function of the two displacement index variable only: h(m,n; m’,n’) = h[ m-m’, n-n’] i.e. the shape of the impulse response does not change as the input impulse move in the (m,n) plane I/O relation for a LSI system: –Equal to the convolution of the input with an impulse response UMCP ENEE631 Slides (created by M.Wu © 2004)

11 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [11] 2-D Convolution 1.Rotate the impulse response array h( ,  ) around the original by 180 degree 2.Shift by (m, n) and overlay on the input array x(m’,n’) 3.Sum up the element-wise product of the above two arrays 4.The result is the output value at location (m, n) From Jain’s book Example 2.1 UMCP ENEE631 Slides (created by M.Wu © 2004)

12 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [12] 2-D Fourier Transforms UMCP ENEE631 Slides (created by M.Wu © 2004)

13 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [13] Review of 1-D Fourier Transform UMCP ENEE624 Slides (created by M.Wu © 2003)

14 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [14] 2-D Fourier Transform for a 2-D continuous function u Horizontal and vertical spatial frequencies (unit: cycles per degree of viewing angle) –Separability: u separable 2-D complex exponentials allow 2-D transform to be realized by a succession of 1-D transforms along each spatial coordinate –Many other properties can be extended from 1-D FT u convolution in one domain  multiplication in another domain u inner product preservation (Parseval energy conservation theorem) UMCP ENEE408G Slides (created by M.Wu © 2002) F(  x, y)F(  x,  y ) F(  x, y)

15 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [15] 2-D Fourier Transform for a 2-D continuous function u Horizontal and vertical spatial frequencies (unit: cycles per degree of viewing angle) –Separability: u separable 2-D complex exponentials allow 2-D transform to be realized by a succession of 1-D transforms along each spatial coordinate –Many other properties can be extended from 1-D FT u convolution in one domain  multiplication in another domain u inner product preservation (Parseval energy conservation theorem) UMCP ENEE408G Slides (created by M.Wu © 2002) F(  x, y)F(  x,  y ) F(  x, y)

16 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [16] Freq. Response & Eigen Functions for LSI System Eigen function of a system –Defined as an input function that is reproduced at the output with a possible change only by a multiplicative factor (i.e. amplitude and phase) –Eigen function for 1-D LTI system is exp[j2  x  x ] Fundamental property of a Linear Shift Invariant System –Eigen functions are 2-D complex exponentials exp[j2  (x  x + y  y )] Frequency response H(  x,  y ) for a 2-D continuous LSI system is the Fourier Transform of its impulse response u represents the (complex) amplitude of the system response for an complex exponential input at spatial frequency (  x,  y ) exp[j2  (x  x + y  y )] H(  x,  y ) exp[j2  (x  x + y  y )] H UMCP ENEE631 Slides (created by M.Wu © 2004)

17 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [17] Freq. Response & Eigen Functions for LSI System Eigen function of a system –Defined as an input function that is reproduced at the output with a possible change only by a multiplicative factor (i.e. amplitude and phase) –Eigen function for 1-D LTI system is exp[j2  x  x ] Fundamental property of a Linear Shift Invariant System –Eigen functions are 2-D complex exponentials exp[j2  (x  x + y  y )] Frequency response H(  x,  y ) for a 2-D continuous LSI system is the Fourier Transform of its impulse response u represents the (complex) amplitude of the system response for an complex exponential input at spatial frequency (  x,  y ) exp[j2  (x  x + y  y )] H(  x,  y ) exp[j2  (x  x + y  y )] H UMCP ENEE631 Slides (created by M.Wu © 2004)

18 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [18] 2-D Discrete Space Fourier Transform For Discrete/Sampled 2-D Functions Note: (1) X(  1,  2 ) is periodic with period 2  by 2  (2) exp{j(m  1 + n  2 )} are eigen functions of 2-D discrete LSI system UMCP ENEE408G Slides (created by M.Wu © 2002)

19 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [19] 2-D Discrete Space Fourier Transform For Discrete/Sampled 2-D Functions Note: (1) X(  1,  2 ) is periodic with period 2  by 2  (2) exp{j(m  1 + n  2 )} are eigen functions of 2-D discrete LSI system UMCP ENEE408G Slides (created by M.Wu © 2002)

20 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [20] 2-D DFT (on Discrete Periodic 2-D Function) –W N = exp{- j2  / N} complex conjugate of primitive N th root of unity –Separability: realize 2-D DFT by succession of 1-D DFTs u Allow for leveraging 1-D fast transform algorithms for 2-D –Circular convolution in one domain ~ multiplication in another domain u convolving w/ periodic signal => circular convolution –Overall normalizing factor of the transform pair = 1 / (MN) UMCP ENEE408G Slides (created by M.Wu © 2002, 2007)

21 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [21] 2-D DFT Property Tables are from Gonzalez-Woods 2/e online slides; book pp210-211.

22 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [22]

23 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [23]

24 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [24] Image examples are from Gonzalez-Woods 2/e online slides. 2-D sinc function plots from B. Liu Princeton EE488 F’06. UMCP ENEE408G Slides (created by M.Wu © 2002) Slide from B. Liu – EE488 F’06 Princeton Examples of 2-D DFT

25 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [25] 2-D Box Function and its FT Image examples are from Gonzalez-Woods 3/e online slides. F[ u, v ] = ATZ [sin(  uT) / (  uT)] [sin(  vZ) / (  vZ)]

26 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [26] Frequency Domain View of Linear Spatial Filtering Image examples are from Gonzalez-Woods 2/e online slides Fig.4.4 & 4.7. UMCP ENEE408G Slides (created by M.Wu © 2002)

27 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [27] Optical and Modulation Transfer Function Optical Transfer Function (OTF) for a LSI imaging system –Defined as its normalized frequency response Modulation Transfer Function (MTF) –Defined as the magnitude of the OTF UMCP ENEE631 Slides (created by M.Wu © 2004)

28 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [28] MTF of Human Visual System Direct MTF measurement of Human Visual System (HVS) –Use sinusoidal grating of varying contrast and spatial frequency u The contrast is specified by ratio of maximum to minimum intensity u Observation of this grating shows the visibility thresholds at various spatial frequencies Typical MTF has band-pass shape –Suggest HVS is most sensitive to mid-freq. and least to high freq. –Some variations with viewer & viewing angle From Jain’s book Figure 3.7 UMCP ENEE631 Slides (created by M.Wu © 2004)

29 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [29] Image Enhancement via Spatial Filtering UMCP ENEE631 Slides (created by M.Wu © 2004)

30 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [30] Spatial Operations with Spatial Mask Spatial mask is 2-D finite impulse response (FIR) filter –Usually has small support 2x2, 3x3, 5x5, 7x7 –Convolve this filter with image u g(m,n) =  f(m-x, n-y) h(x,y) =  f(x,y) h(m-x, n-y) … mirror w.r.t. origin, then shift & sum up –In frequency domain: multiplying DFT(image) with DFT(filter) UMCP ENEE631 Slides (created by M.Wu © 2004) Note: spatial mask is often specified as the already mirrored version of the equivalent FIR filter. Image examples are from Gonzalez-Woods 2/e online slides.

31 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [31] Spatial Averaging Masks For softening, noise smoothing, LPF before subsampling(anti-aliasing), etc. –“isotropic” (i.e. circularly symmetric / rotation invariant) filters: with response independent of directions 1/4 0 1 0101 1/9 -1 0 1 0 1 1/9 01/8 1/2 -1 0 1 0 1 0 1/8 0 0 UMCP ENEE408G/631 Slides (created by M.Wu & R.Liu © 2002/2004)

32 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [32] Frequency Response of Averaging Mask Recall: averaging mask is a FIR filter with a square support => take FT to get its frequency response: it is a low pass filter Image examples are from Gonzalez-Woods 2/e online slides. UMCP ENEE408G Slides (created by M.Wu © 2002)

33 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [33] Suppressing Noise via Spatial Averaging Image with i.i.d. noise y(m,n) = x(m,n) + N(m,n) Averaged version v(m,n) = (1/N w )  x(m-i, n-j) + (1/N w )  N(m-i, n-j) Noise variance reduced by a factor of N w –N w ~ # of pixels in the averaging window SNR improved by a factor of N w if x(m,n) is constant in local window Window size is limited to avoid blurring UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

34 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [34] Directional Smoothing Problems with simple spatial averaging mask –Edges get blurred Improvement –Restrict smoothing to along edge direction –Avoid filtering across edges Directional smoothing –Compute spatial average along several directions –Take the result from the direction giving the smallest changes before & after filtering Other solutions –Use more explicit edge detection and adapt filtering accordingly  WW UMCP ENEE631 Slides (created by M.Wu © 2001)

35 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [35] Coping with Salt-and-Pepper Noise ( From Matlab Image Toolbox Guide Fig.10-12 & 10-13 ) UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

36 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [36] Median Filtering Salt-and-Pepper noise –Isolated white/black pixels spread randomly over the image –Spatial averaging filter may incur blurred output Median filtering –Take median over a small window as output ~ nonlinear u Median{ x(m) + y(m) }  Median{x(m)} + Median{y(m)} –Odd window size is commonly used u 3x3, 5x5, 7x7 u 5-pixel “ + ”-shaped window –Even-sized window ~ take the average of two middle values as output Generalize: apply order statistic operations UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

37 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [37] Image Sharpening Use LPF to generate HPF –Subtract a low pass filtered result from the original signal –HPF extracts edges and transitions Enhance edges I 0  I LP  I HP = I 0 – I LP  I 1 = I 0 + a*I HP UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

38 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [38] Example of Image Sharpening –v(m,n) = u(m,n) + a * g(m,n) –Often use Laplacian operator to obtain g(m,n) –Laplacian operator is a discrete form of 2 nd -order derivatives 0-¼ 1 -1 0 1 0 1 0 -¼ 0 0 UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

39 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [39] Example of Image Sharpening Original moon image is from Matlab Image Toolbox. UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

40 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [40] Other Variations of Image Sharpening High boost filter (Gonzalez-Woods 2/e pp132 & pp188) I 0  I LP  I HP = I 0 – I LP  I 1 = (b-1) I 0 + I HP –Equiv. to high pass filtering for b=1 –Amplify or suppress original image pixel values when b  2 Combine sharpening with histogram equalization Image example is from Gonzalez- Woods 2/e online slides. UMCP ENEE408G Slides (created by M.Wu © 2002)

41 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [41] Spatial LPF, HPF, & BPF HPF and BPF can be constructed from LPF Low-pass filter –Useful in noise smoothing and downsampling/upsampling High-pass filter –h HP (m,n) =  (m,n) – h LP (m,n) –Useful in edge extraction and image sharpening Band-pass filter –h BP (m,n) = h L2 (m,n) – h L1 (m,n) –Useful in edge enhancement –Also good for high-pass tasks in the presence of noise u avoid amplifying high-frequency noise UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

42 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [42] Frequency Domain View of LPF / HPF UMCP ENEE631 Slides (created by M.Wu © 2004) Image example is from Gonzalez-Woods 2/e online slides.

43 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [43] Summary of Today’s Lecture 2-D Fourier Transform Image enhancement via spatial filtering –Filtering with a small FIR filter –Averaging vs. Mean filtering Next time –Edge detection –2-D random signals Readings –Gonzalez’s book: Chapter 3.4–3.7; Chapter 4; 2.5-2.6 –Additional ref: Woods’ Book 1.1, 1.2; 4.1, 4.2; 6.6 UMCP ENEE631 Slides (created by M.Wu © 2004; 2009)

44 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [44] Extra: For Future Lectures UMCP ENEE631 Slides (created by M.Wu © 2004)

45 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [45] Gradient, 1 st -order Derivatives, and Edges Edge: pixel locations of abrupt luminance change For binary image –Take black pixels with immediate white neighbors as edge pixel u Detectable by XOR operations For continuous-tone image –Spatial luminance gradient vector of an edge pixel  edge u a vector consists of partial derivatives along two orthogonal directions u gradient gives the direction with highest rate of luminance changes –How to represent edge? u by intensity + direction => Edge map ~ edge intensity + directions –Detection Method-1: prepare edge examples (templates) of different intensities and directions, then find the best match –Detection Method-2: measure transitions along 2 orthogonal directions UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

46 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [46] Common Gradient Operators for Edge Detection –Move the operators across the image and take the inner products u Magnitude of gradient vector g(m,n) 2 = g x (m,n) 2 + g y (m,n) 2 u Direction of gradient vector tan –1 [ g y (m,n) / g x (m,n) ] –Gradient operator is HPF in nature ~ could amplify noise u Prewitt and Sobel operators compute horizontal and vertical differences of local sum to reduce the effect of noise 01 0 0 0 1 1 01 0 -20 1 2 01 10 0 00 0 111 -2 00 0 121 Roberts H 1 (m,n) H 2 (m,n) PrewittSobel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

47 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [47] Examples of Edge Detectors –Quantize edge intensity to 0/1: u set a threshold u white pixel denotes strong edge RobertsPrewittSobel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

48 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [48] Examples of Edge Detectors –Quantize edge intensity to 0/1: u set a threshold u white pixel denotes strong edge RobertsPrewittSobel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

49 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [49] Edge Detection: Summary Measure gradient vector –Along two orthogonal directions ~ usually horizontal and vertical u g x =  L /  x u g y =  L /  y –Magnitude of gradient vector u g(m,n) 2 = g x (m,n) 2 + g y (m,n) 2 u g(m,n) = |g x (m,n) | + |g y (m,n)| (preferred in hardware implement.) –Direction of gradient vector u tan –1 [ g y (m,n) / g x (m,n) ] Characterizing edges in an image –(binary) Edge map: specify “edge point” locations with g(m,n) > thresh. –Edge intensity map: specify gradient magnitude at each pixel –Edge direction map: specify directions UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

50 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [50]

51 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [51] 2-D Z-Transform The 2-D Z-transform is defined by –The space represented by the complex variable pair (z 1, z 2 ) is 4-D Unit surface –If ROC include unit surface Transfer function of discrete LSI system UMCP ENEE631 Slides (created by M.Wu © 2004)

52 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [52] Example of 2-D ZT and Region of Convergence See Lim’s book UMCP ENEE631 Slides (created by M.Wu © 2004)

53 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [53] Stability Recall for 1-D LTI system –Stability condition in bounded-input bounded-output sense (BIBO) is that the impulse response h[n] is absolutely summable u i.e. ROC of H(z) includes the unit circle –The ROC of H(z) for a causal and stable system should have all poles inside the unit circle 2-D Stable LSI system –Requires the 2-D impulse response is absolutely summable –i.e. ROC of H(z 1, z 2 ) must include the unit surface |z 1 |=1, |z 2 |=1 UMCP ENEE631 Slides (created by M.Wu © 2004)

54 M. Wu: ENEE631 Digital Image Processing (Spring'09) Lec5 – 2D FT & Spatial Filtering [54] Stability Recall for 1-D LTI system –Stability condition in bounded-input bounded-output sense (BIBO) is that the impulse response h[n] is absolutely summable u i.e. ROC of H(z) includes the unit circle –The ROC of H(z) for a causal and stable system should have all poles inside the unit circle 2-D Stable LSI system –Requires the 2-D impulse response is absolutely summable –i.e. ROC of H(z 1, z 2 ) must include the unit surface |z 1 |=1, |z 2 |=1 UMCP ENEE631 Slides (created by M.Wu © 2004)


Download ppt "M. Wu: ENEE631 Digital Image Processing (Spring'09) Fourier Transform and Spatial Filtering Spring ’09 Instructor: Min Wu Electrical and Computer Engineering."

Similar presentations


Ads by Google