資源簡介
包含了四中可以在matlab實現的圖像去噪程序,很好用

代碼片段和文件信息
A?=?imread(‘C:\Documents?and?Settings\陽陽\桌面\lena1.bmp‘);
%讀取圖像數據,并將圖像數據存入A中
B=rgb2gray(A);
%將彩色圖像轉換成灰度圖像
B_chengxing?=?imnoise(B‘speckle‘);??????
%加入乘性噪聲
h=fspecial(‘average‘3);??????
?%?fspecial函數用于產生預定義濾波器
A_junzhi=uint8(round(filter2(hB)));
%進行均勻濾波filter2函數用于圖像濾波此處h是濾波參數(均值),I是要處理的圖像?round為最近的整數uint8為函數類型
A_zhongzhi=medfilt2(B_chengxing[77]);
%進行中值濾波窗口越大處理效果越明顯,但圖像會越來越模糊,7×7?的窗口比較合適
A_weina1=wiener2(B_chengxing[77]);?????
?%進行一次二維維納濾波
A_weina2=wiener2(A_weina1[77]);?????
%進行二次維納濾波
subplot(231);imshow(B);title(‘原灰度圖像‘);
subplot(232);imshow(B_gaosi);title(‘加入乘性噪聲后的圖像‘)
subplot(233);imshow(A_junzhi);title(‘均值濾波后圖像‘);
subplot(234);imshow(A_zhongzhi);title(‘中值濾波后圖像‘);
subplot(235);imshow(A_weina1);title(‘一次維納濾波后圖像‘);
subplot(236);imshow(A_weina2);title(‘二次維納濾波后圖像‘);%分隔顯示圖像進行比較,并注明標題
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????1051??2012-10-19?10:48??去噪程序\quchengxing.m
?????文件???????1036??2012-10-19?10:44??去噪程序\qugaosi.m
?????文件???????1047??2012-10-19?10:48??去噪程序\qujiaoyan.m
?????文件???????1487??2012-10-19?10:47??去噪程序\qumaichong.m
?????目錄??????????0??2010-01-09?22:57??去噪程序
-----------?---------??----------?-----??----
?????????????????4621????????????????????5
評論
共有 條評論