91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 923KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-01
  • 語言: Matlab
  • 標(biāo)簽:

資源簡介

7種圖像降噪matlab實現(xiàn)(程序源碼及結(jié)果圖和說明書任務(wù)書)

資源截圖

代碼片段和文件信息

%?圖像空間域處理
[Imap]?=?imread(‘pout.tif‘);
J1=imnoise(I‘gaussian‘00.02);?
%?疊加均值為0,方差為0.02的高斯噪聲,可以用localvar代替
%J1=imnoise(I‘salt?&?pepper‘0.04);?%?疊加密度為0.04的椒鹽噪聲
M4=[0?1?0;?1?0?1;?0?1?0];
M4=M4/4;?????????????????%?4鄰域平均濾波
I_filter1=filter2(M4J1);
figuresubplot(331);imshow(I);title(‘原圖像‘);
subplot(332);imshow(J1);title(‘加噪聲后圖像‘);
subplot(333);imshow(I_filter1map);?title(‘4鄰域平均濾波后圖像‘);
M8=[1?1?1;?1?0?1;?1?1?1];??????%?8鄰域平均濾波
M8=M8/8;
I_filter2=filter2(M8J1);
subplot(334);imshow(I_filter2map);title(‘8鄰域平均濾波后圖像‘);
K1?=?medfilt2(J1[55]);?????%中值濾波
subplot(335);imshow(K1);title(‘5中值濾波后圖像‘);
?%低通濾波
J3=double(J1)/255;
h=[1/9?1/9?1/9;1/9?1/9?1/9;1/9?1/9?1/9];
K4=filter2(hJ3)
subplot(337);imshow(K4);title(‘低通濾波后圖像‘);

%頻域處理
%I=imread(‘pout.tif‘);
%figuresubplot(221);imshow(I);
%J1=imnoise(I‘salt?&?pepper‘);???%?疊加椒鹽噪聲
%subplot(222);imshow(J1);
f=double(J1);?????%?數(shù)據(jù)類型轉(zhuǎn)換,MATLAB不支持圖像的無符號整型的計算
g=fft2(f);????????%?傅立葉變換
g=fftshift(g);?????%?轉(zhuǎn)換數(shù)據(jù)矩陣
[MN]=size(g);
nn=2;???????????%?二階巴特沃斯(Butterworth)低通濾波器
d0=50;
m=fix(M/2);?n=fix(N/2);
for?i=1:M
???????for?j=1:N
???????????d=sqrt((i-m)^2+(j-n)^2);
???????????h=1/(1+0.414*(d/d0)^(2*nn));??%?計算低通濾波器傳遞函數(shù)
???????????result(ij)=h*g(ij);
???????end
end
result=ifftshift(result);
J2=ifft2(result);
J3=uint8(real(J2));
subplot(338);imshow(J3);?title(‘二階巴特沃斯低通濾波器后圖像‘);?%?顯示濾波處理后的圖像
K=zeros(size(J1));
for?i=1:100
J1=imnoise(I‘gaussian‘0.002);

J2=im2double(J1);%將100幅加有噪聲的圖像進行相加并求其平均值顯示求平均后圖像。
K=K+J2;
end
K=K/100;
subplot(339);
imshow(K);
title(‘多幅圖像平均法‘);

%自適應(yīng)濾波(維納濾波)
K=wiener2(J1[5?5])
subplot(336);
imshow(K);
title(‘自適應(yīng)濾波‘);

%載入圖片
load?wgatlin;
figure
subplot(221);
image(X);
colormap(map);
title(‘f‘);
axis?square;
%加噪
init=2055615866;
randn(‘seed‘init);
X1=X+20*randn(size(X));
subplot(222);
image(X1);
colormap(map);
title(‘加噪后‘);
axis?square;
%用sym2波降噪
T=wpdec2(X11‘sym2‘);
thr=18.342;
NT=wpthcoef(T0‘s‘thr);
X2=wprcoef(NT1);
subplot(223);
image(X2);
colormap(map);
title(‘h‘)
axis?square;
%用sym2波降噪二次降噪
T=wpdec2(X21‘sym2‘);
thr=18.342;
NT=wpthcoef(T0‘s‘thr);
X3=wprcoef(NT1);
subplot(224);
image(X3);
colormap(map);
title(‘用sym2波降噪二次降噪‘)
axis?square;

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????69004??2009-04-13?14:11??xubiniq\pout.tif

?????文件???????2496??2010-01-07?21:20??xubiniq\xubiniq.asv

?????文件??????14103??2010-01-07?21:23??xubiniq\xubiniq.docx

?????文件???????2520??2010-01-11?21:22??xubiniq\xubiniq.m

?????文件?????974336??2010-01-12?10:12??xubiniq\課程設(shè)計任務(wù)書xubiniq.doc

?????目錄??????????0??2010-01-12?10:14??xubiniq

-----------?---------??----------?-----??----

??????????????1062459????????????????????6


評論

共有 條評論

相關(guān)資源