资源描述:
《图像处理实验三报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、Lab3【实验目的】1、了解傅立叶变换在图像处理中的应用;2、掌握Matlab对图像进行滤波处理,并对不同类型的结果进行分析;【实验内容】2Exercise1一2・DFourierTransformsUsingtheimagefileshardware・£if、shuttle.tif,andxray.tif,readineachoftheimagesandcoiiiputcthe2-DDFTlnagnitucleforcaclioftheimages・()】iasingleplot(usingagridof2x2images
2、),plotthefollowing:•theoriginalgrayscaleimageintheupperleftcell•theimagerepresentationoftlie2-DDFTmagnitudeoftlicimagebeingstudiedintliciqjperrightcell•acli])pcdandscaledversionofthe2-DDFTmagnitudethatisclippedandscaleatalevelwlicrcyoucansecthenatureofthe2-DDFTmagn
3、itudeforeachimage;thisplotshouldbe])lciceclinthelowerleftcell•thelogtransformed2-DDFTmagnitudeplottedagainonascaletliatenablesyoutoseethestructureoftlictiansfonnmagnitude;thisplotshouldbeplacedinthelowerrightcellYouwillneedtousetheMatlabroutineFS=fftshift(F)toshift
4、theDCmagnitudepointfromtheup])erleftcorneroftheimagetothocenterofthemagnituderange.InyourLal)3lcpoT仁inchidotlieMATLABcodealongwithimageplotsofthethreeiinagcsforwliicliyourcj^cattlieanalysis・Canyousayliowtheimageproperties(inagrosssense)arcseenintlie2-DDFTmagnitudep
5、lots?f=imread(fhardware.tiff);f=double(f);subplot(221),imshow(f,[J)F=fft2(f);S=abs(F);subplot(222),imshow(S,[])Fc=fftshift(angle(S));subplot(223),imshow(Fc,[])F=fftshift(S);S2=log(l+abs(F));subplot(224),imshow(S2,[])4Exercise3—LinearFilteringofImages(a)UsingtheMATL
6、ABroutineH=lpfilter(type,M,N,DO,n)fordesigninglowjjassfilters,wheretheinputargumentsare:type=,gaussian;,'ideal'or'btw'(forButterworthfilters)M,N=dimensionalityoffilterfrequencyresponseDO=filtercutofffrequency(normalizedtorange[0,M]or[0N])n=filterorderforButterworth
7、filtersandtheoutputHisthefrequencyresponseofthefilter,writeaMATLABni-filethatacceptsasinputthefiltertyi)c(ftype二'gaussian'「ideal','btw'),thecutofffrcxpiencyDO.and(optionallyfortheButterworthfilter)thefilterordern.WithintheMatlab])rogram?plotthefilterfrequencyrespon
8、se(usingthemeshcominaiid)alongwiththefilterimpulseresponse.Testyour])rogr