资源描述:
《lec5 Intensity Transformations and Spatial Filtering (III)》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ImageAnalysisandComputerVisionLecture5!IntensityTransformationsandSpatialFiltering(III)WeiqiangWangSchoolofInformationScienceandEngineering,GUCASSeptember19,2010W.Q.Wang(SISE,GUCAS)ImageAnalysisandComputerVisionSeptember19,20101/18Outline1StandardSpatialFiltersinImageProcessingToolboxW.Q.Wang(SISE,G
2、UCAS)ImageAnalysisandComputerVisionSeptember19,20102/18StandardSpatialFiltersinImageProcessingToolboxLinearSpatialFilteringThetoolboxsupportsanumberofpredened2-Dlinearspatiallters,obtainedbyusingfunctionfspecial,whichgeneratesaltermask,w,usingthesyntaxw=fspecial('type',parameters)where'type'speci
3、estheltertype,andparametersfurtherdenethespeciedlter.W.Q.Wang(SISE,GUCAS)ImageAnalysisandComputerVisionSeptember19,20103/18StandardSpatialFiltersinImageProcessingToolboxLinearSpatialFilters(cont.)Functionfspecial('laplacian',alpha)implementsamoregeneralLaplacianmask:Wenowproceedtoenhancetheimag
4、einFig.3.16(a)usingtheLaplacian.ThisimageisamildlyblurredimageoftheNorthPoleofthemoon.Enhancementinthiscaseconsistsofsharpeningtheimage,whilepreservingasmuchofitsgraytonalityaspossible.W.Q.Wang(SISE,GUCAS)ImageAnalysisandComputerVisionSeptember19,20104/18StandardSpatialFiltersinImageProcessingToolbo
5、xLinearSpatialFilters(cont.)g(x;y)=f(x;y) r2f(x;y)W.Q.Wang(SISE,GUCAS)ImageAnalysisandComputerVisionSeptember19,20105/18StandardSpatialFiltersinImageProcessingToolboxLinearSpatialFilters(cont.)Enhancementproblemsoftenrequirethespecicationofltersbeyondthoseavailableinthetoolbox.TheLaplacianisagoode
6、xample.Thetoolboxsupportsa33Laplacianlterwitha 4inthecenter.Usually,sharperenhancementisobtainedbyusingthe33Laplacianlterthathasa 8inthecenterandissurroundedby1s,asdiscussedearlier.>>f=imread('Fig0316(a)(moon).tif');>>w4=fspecial('laplacian',0);>>w8=[111;1õ81;111];>>f=im2double(f);>>g4=fõimlter
7、(f,w4,'replicate');>>g8=fõimlter(f,w8,'replicate');>>imshow(f)>>gure,imshow(g4)>>gure,imshow(g8)W.Q.Wang(SISE,GUCAS)ImageAnalysisandComputerVisionSeptember19,20106/18StandardSpatialFiltersinImagePr