空間濾波 Spatial Filtering

Embed Size (px)

Text of 空間濾波 Spatial Filtering

Vision-based Game Class

Spatial FilteringNov. 9, 2014 : : Spatial Filtering 1 Spatial and Frequency Domain Basic of Spatial Filtering Smoothing Spatial Filter Pepper-and-salt Noise and Median Filter Sharping Spatial Filter2 5 2Spatial and Frequency Domain334

4 ()Photoshop (Smoothing) (Sharping)5T Transformation 56

TransformationInverse Transformation 6 () (Fourier Transform) JPEG (Discrete Cosine Transform ) 7

T Transformation 7Basic of Spatial Filtering889(x,y) f(x,y)yxmask (filter) (mask) (kernel) (template) (window)(coefficient)

9 ()10f(x-1,y-1)f(x-1,y)f(x-1,y+1)f(x,y-1)f(x,y)f(x,y+1)f(x+1,y-1)f(x+1,y)f(x+1,y+1)w(-1,-1)w(-1,0)w(-1,1)w(0,-1)w(0,0)w(0,1)w(1,-1)w(1,0)w(1,1)10 ()11f(x-1,y-1)f(x-1,y)f(x-1,y+1)f(x,y-1)f(x,y)f(x,y+1)f(x+1,y-1)f(x+1,y)f(x+1,y+1)w(-1,-1)w(-1,0)w(-1,1)w(0,-1)w(0,0)w(0,1)w(1,-1)w(1,0)w(1,1)11 ()12f(x-1,y-1)f(x-1,y)f(x-1,y+1)f(x,y-1)f(x,y)f(x,y+1)f(x+1,y-1)f(x+1,y)f(x+1,y+1)w(-1,-1)w(-1,0)w(-1,1)w(0,-1)w(0,0)w(0,1)w(1,-1)w(1,0)w(1,1)12Smoothing Spatial Filter131314(Smoothing filter) (blurring)(noise reduction)(object extraction)(preprocessing) 14 ()15(smoothing filter) (averaging filter)(lowpass filter)

15 ()1611111111112124212116 ()1717Median Filter and Pepper-and-salt Noise181819(order-statistics filter) (max filter)(min filter)(median filter)1920(impulse noise)(pepper-and-salt noise)20

()21 6% 21

()22 20% 22Sharping Spatial Filter232324 (sharping filter)

2425

:

p. 4-4125 ()2626 ()2727: 2828: 292930

30 ()315543210006000013100007777Image stripFirstDerivative-1-1-1-1-1006-600012-2-10007000SecondDerivative-10000106-1260011-411007-700765432100-10000106-1260011-411007-70031 ()32 4 (edge) 5 2

32 ()33 2 () 3

33 ()34 4 () 5

34 ()35 1 2 ()

35 ()36(edge) 363737383839f(x-1,y-1)f(x-1,y)f(x-1,y+1)f(x,y-1)f(x,y)f(x,y+1)f(x+1,y-1)f(x+1,y)f(x+1,y+1)0101-410103940f(x-1,y-1)f(x-1,y)f(x-1,y+1)f(x,y-1)f(x,y)f(x,y+1)f(x+1,y-1)f(x+1,y)f(x+1,y+1)1111-81111404141420-10-15-10-10-1-1-1-19-1-1-1-14243

43