資源描述:
《matlab小波變換函數(shù)的總結(jié)與程序》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、小波去噪舉例MATLAB中用wnoise函數(shù)測試去噪算法sqrt_snr=3;init=231434;[x,xn]=wnoise(3,11,sqrt_snr,init);%加噪,信噪比為3subplot(3,2,1),plot(x)title('originaltestfunction')subplot(3,2,2),plot(xn)title('noisedfunction')lev=5;xd=wden(x,'heursure','s','one',lev,'sym8');%利用小波對一維信號進(jìn)行降噪,XD為降噪后的%信號,CXD,LXD為XD的小波分解結(jié)構(gòu)%'s'or'h'決定閾
2、值的使用方式,SCAL決定閾值是%否隨噪聲變化:'one'不調(diào)整,'sln'對第一層系%數(shù)的層噪聲分別進(jìn)行估計和調(diào)整;'mln'對各層%系數(shù)的層噪聲分別進(jìn)行估計和調(diào)整;subplot(3,2,3),plot(xd)title('Onede-noisedfunction')xd=wden(x,'heursure','s','sln',lev,'sym8');subplot(3,2,4),plot(xd)title('Slnde-noisedfunction')xd=wden(x,'sqtwolog','s','sln',lev,'sym8');%固定閾值選擇算法去噪subplot(3,
3、2,5),plot(xd)title('Sqtwologde-noisedfunction')[c,l]=wavedec(x,lev,'sym8');subplot(3,2,6),plot(xd)title('CLde-noisedfunction')otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWest
4、NorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCountypartyCommitteeSecretary,MinistersandMATLAB中圖像噪聲處理舉例loadsin
5、sin;colormap('default');subplot(1,3,1),image(X);title('originalimage');axis('square');init=231434;randn('seed',init);X=X+18*randn(size(X));%產(chǎn)生噪聲信號subplot(1,3,2),image(x);title('noisedimage');axis('square');[thr,sorh,keepapp]=ddencmp('den','wv',x);%自動生成小波去躁或壓縮的閾值選擇方案,也%就是尋找默認(rèn)值[xc,cxc,lxc,perf0,p
6、erfl2]=wdencmp('gbl',x,'sym4',2,thr,sorh,keepapp);%使用全局閾值進(jìn)行%圖象降噪subplot(1,3,3),image(xc);title('denoisedimage');axis('square')otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939servedasrecorderoftheWest
7、NorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderofth