




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、實 驗 報 告課程名稱 數(shù)字圖像處理導(dǎo)論 專業(yè)班級 _ 姓 名 _ 學 號 _ 電氣與信息學院和諧 勤奮 求是 創(chuàng)新16 / 17文檔可自由編輯打印實驗題目圖像復(fù)原實驗-空域濾波復(fù)原實驗室 DSP室&信號室實驗時間2015 年 10月 13 日 實驗類別 設(shè)計同組人數(shù)2成 績指導(dǎo)教師簽字:一實驗?zāi)康?. 掌握圖像濾波的基本定義及目的。2. 理解空間域濾波的基本原理及方法。3. 掌握進行圖像的空域濾波的方法。二實驗內(nèi)容1. 讀出eight.tif這幅圖像,給這幅圖像分別加入椒鹽噪聲和高斯噪聲后并與前一張圖顯示在同一圖像窗口中。2. 對加入噪聲圖像選用不同的平滑(低通)模板做運算,對比不同
2、模板所形成的效果,要求在同一窗口中顯示。3. 使用函數(shù)imfilter時,分別采用不同的填充方法(或邊界選項,如零填充、replicate、symmetric、circular)進行低通濾波,顯示處理后的圖像。4. 運用for循環(huán),將加有椒鹽噪聲的圖像進行10次,20次均值濾波,查看其特點,顯示均值處理后的圖像(提示:利用fspecial函數(shù)的average類型生成均值濾波器)。5. 對加入椒鹽噪聲的圖像分別采用均值濾波法,和中值濾波法對有噪聲的圖像做處理,要求在同一窗口中顯示結(jié)果。6. 自己設(shè)計平滑空間濾波器,并將其對噪聲圖像進行處理,顯示處理后的圖像。三實驗具體實現(xiàn)1. 讀出(自己選定.t
3、if)這幅圖像,給這幅圖像分別加入椒鹽噪聲和高斯噪聲后并與前一張圖顯示在同一圖像窗口中。I=imread('trees.tif');subplot(1,3,1)imshow(I);title(' Original Image ');J = imnoise(I,'salt & pepper',0.05); %noise density=0.05subplot(1,3,2)imshow(J);title(' salt & pepper ');K= imnoise(I,'gaussian',0.01,0.
4、01); subplot(1,3,3)imshow(K);title(' gaussian ') 2. 對加入噪聲圖像選用不同的平滑(低通)模板做運算,對比不同模板所形成的效果,要求在同一窗口中顯示。I=imread('moon.tif');H = fspecial('sobel');subplot(2,2,1)imshow(I);title(' Qriginal Image ');Sobel = imfilter(I,H,'replicate');subplot(2,2,2)imshow(Sobel);title
5、(' Sobel Image ')H = fspecial('laplacian',0.4);lap = imfilter(I,H,'replicate');subplot(2,2,3)imshow(lap);title(' Laplacian Image ')H = fspecial('gaussian',3 3,0.5);gaussian = imfilter(I,H,'replicate');subplot(2,2,4)imshow(gaussian);title(' Gaussian
6、 Image ')3. 使用函數(shù)imfilter時,分別采用不同的填充方法(或邊界選項,如零填充、replicate、symmetric、circular)進行低通濾波,顯示處理后的圖像。originalRGB = imread('trees.tif');subplot(3,2,1)imshow(originalRGB);title(' Qriginal Image ');h = fspecial('motion', 50, 45); %motion blurredfilteredRGB = imfilter(originalRGB, h
7、);subplot(3,2,2)imshow(filteredRGB);title(' Motion Blurred Image ');boundaryReplicateRGB = imfilter(originalRGB, h, 'replicate');subplot(3,2,3)imshow(boundaryReplicateRGB);title(' 0-Padding');boundary0RGB = imfilter(originalRGB, h, 0);subplot(3,2,4)imshow(boundary0RGB);title(
8、'Replicate');boundarysymmetricRGB = imfilter(originalRGB, h, 'symmetric');subplot(3,2,5)imshow(boundarysymmetricRGB);title(' Symmetric ');boundarycircularRGB = imfilter(originalRGB, h, 'circular');subplot(3,2,6)imshow(boundarycircularRGB);title(' Circular');4.
9、 運用for循環(huán),將加有椒鹽噪聲的圖像進行10次,20次均值濾波,查看其特點,顯示均值處理后的圖像(提示:利用fspecial函數(shù)的average類型生成均值濾波器)。I=imread('kids.tif');J = imnoise(I,'salt & pepper',0.05);subplot(1,3,1)imshow(J);title(' salt & pepper Noise');h=fspecial('average'); %Averaging FilteringJ1=imfilter(J,h);for i
10、=1:10J1=imfilter(J,h);subplot(1,3,2)imshow(J1);title(' 10 Averaging Filtering');endJ2=imfilter(J,h);for i=1:20J2=imfilter(J,h); subplot(1,3,3)imshow(J2);title(' 20 Averaging Filtering');end5. 對加入椒鹽噪聲的圖像分別采用均值濾波法,和中值濾波法對有噪聲的圖像做處理,要求在同一窗口中顯示結(jié)果。I=imread('trees.tif');J = imnoise(
11、I,'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(' Medi
12、an 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;I=imread('trees.tif');J = imnoise(I,'salt & pepper',0.05);subplot(1,2,1)imshow(J);title(' Original Image ');K1= ordfilt2(J,5,domain);subplot(1,2,2)imshow(
13、K1);title(' 5*5 Smoothing Fitered Image');附錄:可能用到的函數(shù)和參考結(jié)果*報告里不能用參考結(jié)果中的圖像1) 讀出eight.tif這幅圖像,給這幅圖像分別加入椒鹽噪聲和高斯噪聲后并與前一張圖顯示在同一圖像窗口中。 I=imread('cameraman.tif');subplot(1,3,1)imshow(I);title(' Qriginal Image ');J = imnoise(I,'salt & pepper',0.05); %noise density=0.05subp
14、lot(1,3,2)imshow(J);title(' salt & pepper ');K= imnoise(I,'gaussian',0.01,0.01); subplot(1,3,3)imshow(K);title(' gaussian '); 圖2.1 初始圖像及椒鹽噪聲圖像、高斯噪聲污染圖 2) 對加入噪聲圖像選用不同的平滑(低通)模板做運算,對比不同模板所形成的效果,要求在同一窗口中顯示。I=imread('trees.tif');H = fspecial('sobel');subplot(2,
15、2,1)imshow(I);title(' Qriginal Image ');Sobel = imfilter(I,H,'replicate');subplot(2,2,2)imshow(Sobel);title(' Sobel Image ')H = fspecial('laplacian',0.4);lap = imfilter(I,H,'replicate');subplot(2,2,3)imshow(lap);title(' Laplacian Image ')H = fspecial(&
16、#39;gaussian',3 3,0.5);gaussian = imfilter(I,H,'replicate');subplot(2,2,4)imshow(gaussian);title(' Gaussian Image ') 圖2.2 原圖像及各類低通濾波處理圖像 3) 使用函數(shù)imfilter時,分別采用不同的填充方法(或邊界選項,如零填充、replicate、symmetric、circular)進行低通濾波,顯示處理后的圖像。originalRGB = imread('sedemo_onion.png');subplot(3
17、,2,1)imshow(originalRGB);title(' Original Image ');h = fspecial('motion', 50, 45); %motion blurredfilteredRGB = imfilter(originalRGB, h);subplot(3,2,2)imshow(filteredRGB);title(' Motion Blurred Image ');boundaryReplicateRGB = imfilter(originalRGB, h, 'replicate');subp
18、lot(3,2,3)imshow(boundaryReplicateRGB);title(' 0-Padding');boundary0RGB = imfilter(originalRGB, h, 0);subplot(3,2,4)imshow(boundary0RGB);title('Replicate');boundarysymmetricRGB = imfilter(originalRGB, h, 'symmetric');subplot(3,2,5)imshow(boundarysymmetricRGB);title(' Symm
19、etric ');boundarycircularRGB = imfilter(originalRGB, h, 'circular');subplot(3,2,6)imshow(boundarycircularRGB);title(' Circular'); 圖2.3 原圖像及運動模糊圖像 圖2.4 函數(shù)imfilter各填充方式處理圖像 4) 運用for循環(huán),將加有椒鹽噪聲的圖像進行10次,20次均值濾波,查看其特點,顯示均值處理后的圖像。I=imread('kids.tif');J = imnoise(I,'salt &
20、; pepper',0.05);subplot(1,3,1)imshow(J);title(' salt & pepper Noise');h=fspecial('average'); %Averaging FilteringJ1=imfilter(J,h);for i=1:10J1=imfilter(J,h);subplot(1,3,2)imshow(J1);title(' 10 Averaging Filtering');endJ2=imfilter(J,h);for i=1:20J2=imfilter(J,h); subpl
21、ot(1,3,3)imshow(J2);title(' 20 Averaging Filtering');end 圖2.5 椒鹽噪聲污染圖像經(jīng)10次、20次均值濾波圖像 由圖2.5可得,20次濾波后的效果明顯好于10次濾波,但模糊程度也更強。5) 對加入椒鹽噪聲的圖像分別采用均值濾波法,和中值濾波法對有噪聲的圖像做處理,要求在同一窗口中顯示結(jié)果I=imread('kids.tif');J = imnoise(I,'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('
溫馨提示
- 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)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 磁懸浮軸承支撐高速永磁轉(zhuǎn)子系統(tǒng)動力學特性分析
- 杏鮑菇的乳酸菌發(fā)酵特性研究及產(chǎn)品開發(fā)
- 保育員的衛(wèi)生管理課件
- 奶牛健康與人類福祉
- 初中合理膳食健康課課件
- 萬圣節(jié)融合營銷策略
- 初中勞動課說課課件
- S-Menthiafolic-acid-生命科學試劑-MCE
- 交通運輸與物流:物流行業(yè)物流園區(qū)智能化物流技術(shù)應(yīng)用與市場前景分析報告
- 交通運輸行業(yè)人才需求預(yù)測與培養(yǎng)模式創(chuàng)新實踐研究報告
- 尿路感染多重耐藥診療與管理
- 2025年湖南省中考歷史試卷真題(含答案)
- 數(shù)學 2024-2025學年人教版七年級數(shù)學下冊期末+試卷
- T/CNFAGS 16-2024綠色甲醇分級標準(試行)
- T/DGGC 022-2023盾構(gòu)機保養(yǎng)與維修技術(shù)規(guī)范
- 江蘇省南京市鼓樓區(qū)金陵匯文中學2025年七下數(shù)學期末監(jiān)測試題含解析
- 2024年寧夏婦女兒童醫(yī)院招聘事業(yè)單位工作人員真題
- 國家開放大學《藥物治療學(本)》形考作業(yè)1-4參考答案
- 電網(wǎng)工程設(shè)備材料信息參考價2025年第一季度
- 成都設(shè)計咨詢集團有限公司2025年社會公開招聘(19人)筆試參考題庫附帶答案詳解
- 滅火器培訓試題及答案
評論
0/150
提交評論