96-03-25.m

来自「Matlab數位影音處理 影像方面的處理」· M 代码 · 共 33 行

M
33
字号
clear all;
f=imread('d:\image\engineer.tif');
fn=imnoise(f,'salt & pepper',0.1);
gaw=fspecial('average',5)
ga=imfilter(fn,gaw);
gdw=fspecial('disk');
gd=imfilter(fn,gdw);
gsw=fspecial('sobel');
gs=imfilter(fn,gsw);
guw=fspecial('unsharp');
gu=imfilter(fn,guw);
g1=ordfilt2(fn, 1,ones(3,3));
gm=ordfilt2(fn, median(1:9),ones(3,3));
gn=medfilt2(fn);
figure
subplot(3,3,1);
imshow(f)
subplot(3,3,2);
imshow(ga)
subplot(3,3,3);
imshow(gd)
subplot(3,3,4);
imshow(fn)
subplot(3,3,5);
imshow(gs)
subplot(3,3,6);
imshow(gu)
subplot(3,3,7);
imshow(gn)
subplot(3,3,8);
imshow(g1)
subplot(3,3,9);
imshow(gm)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?