




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
1、課程名稱 專業(yè)班級:字像處理導(dǎo)論名 號 電氣與信息學(xué)陵和諧勤奮求是創(chuàng)新實驗題目圖像復(fù)原實驗-空域濾波復(fù)原實驗室dsp室&信號室實驗時間2015 年 10 月 13 口實驗類別設(shè)計同組人數(shù)2成績指導(dǎo)教師簽字:一. 實驗?zāi)康?. 掌握圖像濾波的基本定義及0的。2. 理解空間域濾波的基本原理及方法。3. 掌握進行圖像的空域濾波的方法。二. 實驗內(nèi)容1. 讀岀eighltif這幅圖像,給這幅圖像分別加入椒鹽噪聲和高斯噪聲后并與前一張圖顯示在同一圖 像窗口中。2. 對加入噪聲圖像選用不同的平滑(低通)模板做運算,對比不同模板所形成的效果,要求在同 一窗口中顯示。3. 使用函數(shù)imfdter時,分
2、別采用不同的填充方法(或邊界選項,如零填 充、replicate、symmetric、circular)進行低通濾波,顯示處理后的圖像。4. 運用for循環(huán),將加有椒鹽噪聲的圖像進行10次,20次均值濾波,查看其特點,顯示均值處理后 的圖像(提示:利用fspecial函數(shù)的average類型生成均值濾波器)。5. 對加入椒鹽噪聲的圖像分別采用均值濾波法,和中值濾波法對有噪聲的圖像做處理,要求在同 一窗口中顯示結(jié)果。6. 自己設(shè)計平滑空間濾波器,并將其對噪聲閣像進行處理,顯示處理后的閣像。三. 實驗具體實現(xiàn)1. 讀出(自己選定.tif)這幅圖像,給這幅圖像分別加入椒鹽噪聲和高斯噪聲后并與前一張圖
3、顯示 在同一閣像窗口屮。i=imread(,trees, tif); subplot (1,3, 1) inishow(t);title( original image );j = imnoised, * salt & pepper,0. 05) ; %noise density=0. 05 subplot (1, 3, 2) imshow(j);titlesalt & pepper );k= imnoise(i, gaussian,0. 01, 0. 01); subplot (1, 3, 3)imshow(k);title( gaussian )2. 對加入噪聲圖像選用不同
4、的平滑(低通)模板做運算,對比不同模板所形成的效果,要求在同 一'窗口中顯不。i=imread(,moon, tif);h = fspecial ( sobel); subplot (2, 2, 1) imshow(t);titlec original image );sobel 二 imfilter(i, h, replicate); subplot (2, 2, 2)imshow(sobel); title( sobel image )ii = fspecial c lapla.cian,, 0. 4); lap = imfilter(i,h,replicate); subplot
5、 (2, 2, 3) imshow(lap);titlec laplacian image )h 二 fspecial ( gaussian,3 3, 0. 5); gaussian = imfiiter(i, h,' replicate'); subplot (2, 2, 4)imshow(gaussian); titlec gaussian tmage )3. 使用函數(shù)imfilter時,分別采用不同的填充方法(或邊界選項,如零填 充、replicate、symmetric、circular)進行低通濾波,顯示處理后的圖像。originalrgb = imread(ftre
6、es.tif); subplot(3,2,l) imshow(originalrgb); title( qriginal image );h = fspecial(motion,50, 45); %motion blurred filteredrgb = imfilter(originalrgb, h); subplot(3,2,2)imshow(filteredrgb);title( motion blurred image );boundaryreplicatergb = imfilter(originalrgb,h, replicate); subplot(3,2,3)imshow(bo
7、undaryreplicatergb); title(' o-padding*);boundaryorgb = imfilter(originalrgb, h, 0);subplot(3,2,4)imshow(boundaryorgb);title(replicate);boundarysymmetricrgb = imfilter(originalrgb, h,symmetric); subplot(3,2,5)imshow(boundarysymmetricrgb); title( symmetric r);boundarycircularrgb = imfilter(origin
8、alrgb,h,'circular); subplot(3,2,6)imshow(boundarycircularrgb); title( circular);4. 運用for循環(huán),將加有椒鹽噪聲的圖像進行10次,20次均值濾波,查看其特點,s示均值處理后 的圖像(提示:利用fspecial函數(shù)的average類型生成均值濾波器)。i=imreadc kids. tifj);j = imnoise(t,' salt & pepper,0. 05); subplot (1, 3, 1) imshow(j);titlec salt & pepper noise);
9、h二fspecial( average); %averaging filtering jl=imfil ter (j, h);for i=l:10 jl=imfilter (j, h); subplot (1, 3, 2) imshow(jl);titlec 10 averaging filtering); endj2=imfilter(j, h); for i=l:20 j2=imfilter(j, h); subplot (1, 3, 3) imshow(j2);titlec 20 averaging filtering); end5. 對加入椒鹽噪聲的圖像分別采用均值濾波法,和屮值濾波法
10、對有噪聲的圖像做處理,要求在同 一窗口中顯示結(jié)果。i=imread(,trees, tif);j = imnoised,' salt & pepper,0. 05); subplot (1,3, 1) imshow(j);titleoriginal tmage );h=fspecial( average); %averaging filtering jl=imfilter(j, h); subplot (1, 3, 2) imshow(jl);titlec averaging filtering );j2=medfiit2(j);%median filteringsubplot
11、 (1, 3, 3)imshow(j2);titlec median filtering );6. 自己設(shè)計平滑空間濾波器,并將其對噪聲圖像進行處理,顯示處理后的圖像。domain=0 0 8 0 0;0 0 8 0 0;8 8 8 8 8;0 0 8 0 0;0 0 8 0 0;l=jmread('trees.tif);j = imnoise(l,salt & pepper*,0.05); subplot(1,2,1)imshow(j);title(* original image ');k1= ordfilt2(j,5,domain); subplot(1,2,2)
12、 imshow(k1);titlef 5*5 smoothing fitered image');附錄:可能用到的函數(shù)和參考結(jié)果*報告里不能用參考結(jié)果中的圖像1) 讀岀eight.tif這幅圖像,給這幅圖像分別加入椒鹽噪聲和高斯噪聲后并與前一張 圖顯示在同一圖像窗口中。l=imread(fcameraman.tif); subplot(1,3,1) imshow(l);titlef original image );j = imnoise(l/salt & pepper0.05); %noise density=0.05subplot(1,3,2)imshow(j);title
13、( salt & pepperf);k= imnoise(l/gaussian0.01,0.01);subplot(1,3,3)imshow(k);titlef gaussian );original imagesalt&pepper noisegaussian noise圖2.1初始圖像及椒鹽噪聲圖像、高斯噪聲污染圖2) 對加入噪聲圖像選用不同的平滑(低通)模板做運算,對比不同模板所形成的效 果,要求在同一窗口屮顯示。|=imread(trees.tif);h = fspecial(.sobel);subplot(2,2,1)imshow(l);titlef original
14、 image ');sobel = imfilter(l,h,'replicate*);subplot(2,2,2)imshow(sobel);titlef sobel image )h = fspecial(flaplacian0.4);lap = imfilter(l,h,*replicate*);subplot(2,2,3)imshow(lap);title(f laplacian image )h = fspecial(.gaussianf,3 3,0.5);gaussian = imfilter(l,h/replicate,);subplot(2,2,4)imshow
15、(gaussian);titlef gaussian image f)圖2. 2原圖像及各類低通濾波處理圖像3) 使用函數(shù)imfiltei時,分別采用不同的填充方法(或邊界選項,如零填 充、replicate、symmetric、circular)進行低通濾波,顯示處理后的圖像。originalrgb = imread(sedemo_onion.png,);subplot(3,2,1)imshow(originalrgb);title( original image );h = fspecial(motion,50, 45); %motion blurredfilteredrgb = imfi
16、lter(originalrgb, h);subplot(3,2,2)imshow(filteredrgb);titlec motion blurred image );boundaryreplicatergb = imfilter(originalrgb, h, replicate);subplot(3,2,3)imshow(boundaryreplicatergb);title(. o-padding*);boundaryorgb = imfilter(originalrgb, h, 0);subplot(3,2,4)imshow(boundaryorgb);title(replicate
17、);boundarysymmetricrgb = imfilter(originalrgb, h, 'symmetric*);subplot(3,2,5)imshow(boundarysymmetricrgb);titlef symmetric );boundarycircularrgb = imfilter(originalrgb, h, circular);subplot(3,2,6)imshow(boundarycircularrgb);title( circular);圖2. 3原圖像及運動模糊圖像o-paddingreplicate圖2. 4函數(shù)imfilter各填充方式處理
18、圖像4) 運用for循環(huán),將加有椒鹽噪聲的圖像進行10次,20次均值濾波,查看其特點, 顯示均值處理后的圖像。l=jmread(kids.tif);j = imnoise(l/salt & pepper1,0.05);subplot(1,3,1)imshow(j);titlec salt & pepper noise1);h=fspecial(,average1);%averaging filteringj1=imfilter(j,h);for i=1:10j1=imfilter(j,h);subplot(1,3,2)imshow(j1);titlec 10 averaging
19、 filtering); endj2=imfilter(j,h);for i=1:20j2=imfilter(j,h);subplot(1,3,3)imshow(j2);titlec 20 averaging filtering1); end圖2. 5椒鹽噪聲污染圖像經(jīng)10次、20次均值濾波圖像由圖2.5可得,20次濾波后的效果明顯好于10次濾波,但模糊程度也更強。5)對加入椒鹽噪聲的閣像分別采用均伉濾波法,和屮伉濾波法對有噪聲的閣像做處理,要求在同一窗口中顯示結(jié)果l=imread(kids.tif);j = imnoise(l,salt & pepper.,0.05);subplot(1,3,1)imshow(j);title(. original image ');h=fspecial(average); %averaging filteringj1=imfilter(j,h);subplot(1,3,2)imshow(j1);title( averaging filtering );j2=medfilt2(j);%median filteringsubplot(1,3,3)imshow(j2);title( median filtering );
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 精英團隊廠房設(shè)施養(yǎng)護與維護服務(wù)協(xié)議
- 餐廳資產(chǎn)重組與股份購買及經(jīng)營管理權(quán)交接合同
- 老兵短線技術(shù)課件
- 美術(shù)說課課件教學(xué)
- 瓷器考試題及答案
- 消防安全工作考評與獎懲制度
- 特種設(shè)備的安全操作規(guī)程
- 班組崗位安全生產(chǎn)責(zé)任制
- 火災(zāi)隱患排查整治總結(jié)
- 礦山安全生產(chǎn)責(zé)任制
- DB15-T 3585-2024 高標(biāo)準(zhǔn)農(nóng)田施工質(zhì)量評定規(guī)程
- 電氣設(shè)備-核電行業(yè)研究框架:成長性與穩(wěn)定性兼?zhèn)淇春煤穗娭虚L期價值
- 住房廚衛(wèi)煙氣集中排放系統(tǒng)施工與質(zhì)量驗收規(guī)程
- 企業(yè)深度工作培訓(xùn)
- 杭州浙江杭州市森林和野生動物保護服務(wù)中心招聘編外聘用人員筆試歷年典型考題及考點附答案解析
- 超聲診斷設(shè)備行業(yè)營銷策略方案
- 質(zhì)量環(huán)境職業(yè)健康安全管理體系三合一整合全套體系文件(管理手冊+程序文件)
- 廣東省茂名市直屬學(xué)校2023-2024學(xué)年七年級下學(xué)期期末數(shù)學(xué)試題
- QBT 102T-2023 甜菜糖廠設(shè)計規(guī)范 (正式版)
- 舌系帶短縮治療指南制定與更新
- 2025屆湖南省長郡中學(xué)、雅禮中學(xué)等四校高一物理第二學(xué)期期末經(jīng)典試題含解析
評論
0/150
提交評論