国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

數(shù)字圖像處理:空間域圖像增強(qiáng)

2021-02-14 20:40 作者:喬知洛  | 我要投稿

實(shí)驗?zāi)康模?/span>

1、掌握空間域的圖像濾波增強(qiáng)

2、掌握頻率域的圖像濾波增強(qiáng)

實(shí)驗內(nèi)容及要求:

1、通過imfilter()進(jìn)行平滑濾波

參考代碼如下:

clear?all;close?all;

I=imread('eight.jpg');

J=imnoise(I,'salt & pepper',0.02);

h=ones(3,3)/5;

h(1,1)=0; h(1,3)=0;

h(3,1)=0; h(1,3)=0;

K=imfilter(J,h);

figure;

subplot(131);

imshow(I);

subplot(132);

imshow(J);

subplot(133);

imshow(K);

2、通過conv2()進(jìn)行平滑濾波(均值濾波)

參考代碼如下:

clear?all;close?all;

I=imread('rice.png');

I=im2double(I);

J=imnoise(I,'gaussian',0,0.01);

h=ones(3,3)/9;

K=conv2(J,h);

figure;

subplot(131);

imshow(I);

subplot(132);

imshow(J);

subplot(133);

imshow(K);

3、通過fspecial()和filter2()進(jìn)行平滑濾波

參考代碼如下:

clear?all;close?all;

I=imread('eight.jpg');

I=im2double(I);

J=imnoise(I,'salt & pepper',0.02);

h1=fspecial('average',3);

h2=fspecial('average',5);

K1=filter2(h1,J);

K2=filter2(h2,J);

figure;

subplot(131);

imshow(J);

subplot(132);

imshow(K1);

subplot(133);

imshow(K2);

4、通過medfilt2()進(jìn)行中值濾波

參考代碼如下:

clear?all;close?all;

I=imread('eight.jpg');

I=im2double(I);

J=imnoise(I,'salt & pepper',0.03);

K=medfilt2(J);

figure;

subplot(131);

imshow(J);

subplot(132);

imshow(J);

subplot(133);

imshow(K);

5、通過ordfilt2()進(jìn)行排序濾波

參考代碼如下:

clear?all;close?all;

I=imread('eight.jpg');

I=im2double(I);

J1=ordfilt2(I,1,true(5));

J2=ordfilt2(I,25,true(5));

figure;

subplot(131);

imshow(I);

subplot(132);

imshow(J1);

subplot(133);

imshow(J2);

6、通過wiener2()進(jìn)行自適應(yīng)濾波

參考代碼如下:

clear?all;close?all;

I=imread('eight.jpg');

I=im2double(I);

J=imnoise(I,'gaussian',0,0.01);

K=wiener2(J,[5,5]);

figure;

subplot(131);

imshow(I);

subplot(132);

imshow(J);

subplot(133);

imshow(K);

7、通過拉普拉斯算子進(jìn)行銳化濾波

參考代碼如下:

clear?all;close?all;

I=imread('rice.png');

I=im2double(I);

h=[0,1,0;1,-4,1;0,1,0];

J=conv2(I,h,'same');

K=I-J;

figure;

subplot(121);

imshow(I);

subplot(122);

imshow(K);



數(shù)字圖像處理:空間域圖像增強(qiáng)的評論 (共 條)

分享到微博請遵守國家法律
普安县| 德庆县| 安福县| 大荔县| 海门市| 庐江县| 滨海县| 山西省| 西丰县| 曲水县| 靖远县| 南汇区| 门头沟区| 浮山县| 齐河县| 岐山县| 科技| 奈曼旗| 林口县| 北安市| 明水县| 黑山县| 大冶市| 杂多县| 五莲县| 天气| 龙川县| 隆昌县| 石景山区| 昌黎县| 德江县| 廊坊市| 赣州市| 兴业县| 明星| 拜城县| 左权县| 芜湖县| 靖安县| 襄樊市| 陆丰市|