数字图像处理冈萨雷斯N08学习教案.pptx
会计学1数字图像处理冈萨雷斯数字图像处理冈萨雷斯N08第一页,共29页。Background of Spatial FilteringBackground of Spatial FilteringSpatial Filtering no.2Odd sizeThe border?第2页/共29页第二页,共29页。Background of Spatial Filtering(cont.)Background of Spatial Filtering(cont.)Linear filters:the transfer function and the point spread function of a linear system are inverse Fourier transforms of each other.a)s1s9 intensities of pixels.b)k1k9 mask coefficients.c).Spatial Filtering no.3Convolution mask第3页/共29页第三页,共29页。Smoothing FiltersSmoothing Filters Smoothing filters are used for blurring and for noise reduction.Lowpass filtering(linear):all the coefficients be positive.Such as,sampled by a Gaussian functionNeighborhood averaging,weighted neighborhood averaging,scaled not to out of the valid gray-level range (for mn mask normalized by 1/(mn).Spatial Filtering no.4第4页/共29页第四页,共29页。Examples of averaging FilterExamples of averaging Filtera)Original image,b)noise corrupted,c)e)results of smoothing template by size of 77,9 9,and 11 11.Spatial Filtering no.5第5页/共29页第五页,共29页。Examples of averaging FilterExamples of averaging FilterSpatial Filtering no.6Irrelevant details vs.Mask size第6页/共29页第六页,共29页。Example of averaging FilterExample of averaging FilterSpatial Filtering no.7Small objects blended with background,size of mask?第7页/共29页第七页,共29页。Median filter(nonlinear)Median filter(nonlinear)The gray level of each pixel is replaced by the median of the gray levels in a neighborhood of that pixel,instead of averaging.To achieve noise reduction rather than blurring.The 5th value of a 33 window,Minimal or maximal.Spatial Filtering no.8第8页/共29页第八页,共29页。Sharpening FiltersSharpening FiltersThe objective is to highlight fine detail in an image or to enhance detail that has been blurred.Basic high-pass spatial filteringHigh-boost filteringDerivative filtersLaplacian filtersPrinting,medical,inspection,target detection-1-1-1-1 8-1-1-1-1A classic implementation of sharpening filter,Eliminates zero-frequency termIndicate positive near center,negative in the outer peripherySpatial Filtering no.9第9页/共29页第九页,共29页。Example of High-pass FilterExample of High-pass FilterReducing the average value of image to zero implies that image must have some negative gray levels.Thus involve some form of scaling/clipping so final result span the range 0,L-1Spatial Filtering no.10第10页/共29页第十页,共29页。High-boost FilteringHigh-boost Filtering A high-pass filtered image may be computed as,Highpass=Original LowpassThe definition of high-boost or High-frequency emphasis filter is High boost=(A)Original Lowpass =(A-1)Original+OriginalLowpass =(A-1)Original+Highpass-1-1-1-1 w-1-1-1-1w=9A-1A=1 standard highpass resultA1 part of the original is added back to highpass result,restore low frequency component.Looks more like original with edge enhancement.Spatial Filtering no.11第11页/共29页第十一页,共29页。Example of High-boost FilterExample of High-boost Filtera)original,b)Highpass,c)Highboost a=2,d)extend gray-level of(c)Spatial Filtering no.12第12页/共29页第十二页,共29页。Derivative Filters(nonlinear)Derivative Filters(nonlinear)Averaging pixels over a region tends to blur detail in an image.As averaging is analogous to integration,differentiation can be expected to have the opposite effect and thus sharpen an image.The gradient of f at coordinate(x,y)is defined as the vector,The magnitude of this vector,Spatial Filtering no.13第13页/共29页第十三页,共29页。Derivative Filter approximationDerivative Filter approximation Roberts cross-gradient operators10 0-101-10 Prewitt operators-1-1-10 00111-101-1 01-101z1z2z3z4 z5z6z7z8z9Spatial Filtering no.14第14页/共29页第十四页,共29页。Derivative Filter approximation(cont)Derivative Filter approximation(cont)Sobel operators-1-2-10 00121-101-2 02-101Spatial Filtering no.15第15页/共29页第十五页,共29页。Example of Derivative FilterExample of Derivative FilterSpatial Filtering no.16第16页/共29页第十六页,共29页。Laplacian FiltersLaplacian Filters Laplacian operatorSpatial Filtering no.17第17页/共29页第十七页,共29页。Example of DerivativesExample of DerivativesSpatial Filtering no.18第18页/共29页第十八页,共29页。1D edge detection1D edge detectionSpatial Filtering no.18第19页/共29页第十九页,共29页。1D edge detection1D edge detectionSpatial Filtering no.18Double thin edge or?The zero-crossings of s(x)mark possible edges.第20页/共29页第二十页,共29页。Laplacian enhancementLaplacian enhancementSpatial Filtering no.19第21页/共29页第二十一页,共29页。Example of Laplacian FiltersExample of Laplacian FiltersSpatial Filtering no.20第22页/共29页第二十二页,共29页。High-boost maskHigh-boost maskSpatial Filtering no.21第23页/共29页第二十三页,共29页。Example of High-boost FilterExample of High-boost FilterSpatial Filtering no.22第24页/共29页第二十四页,共29页。Example of combined filteringExample of combined filteringSpatial Filtering no.23第25页/共29页第二十五页,共29页。Example of combined Example of combined filtering(cont.)filtering(cont.)Spatial Filtering no.24第26页/共29页第二十六页,共29页。Review Questionsn nExplain the idea of smoothing filterExplain the idea of smoothing filtern nExplain the idea of sharpening filterExplain the idea of sharpening filtern nExplain the idea of media filterExplain the idea of media filter第27页/共29页第二十七页,共29页。Recommended ReadingRecommended Reading Gonzalez+Woods:Chapter 3 Image Enhancement no.37第28页/共29页第二十八页,共29页。感谢您的观看感谢您的观看(gunkn)!第29页/共29页第二十九页,共29页。