?? 13-6.m
字號:
I = imread('eight.tif');
J = imnoise(I,'salt & pepper',0.02);
%添加椒鹽噪聲
subplot(221),imshow(I)
title('原圖像')
subplot(222),imshow(J)
title('添加椒鹽噪聲圖像')
K1= filter2(fspecial('average',3),J)/255;
%應用3×3鄰域窗口法
subplot(223),imshow(K1)
title('3×3窗的鄰域平均濾波圖像')
K2= filter2(fspecial('average',7),J)/255;
%應用7×7鄰域窗口法
subplot(224),imshow(K2)
title('7×7窗的鄰域平均濾波圖像')
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -