资源描述:
《小波实验报告材料双树复小波变换.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、一、题目:双树复小波变换二、目的:双树复小波和实小波变换的比较三、算法及其实现:提取阶梯型边界点1.算法。幅值:相位:2.代码实现。我采用Matlab函数编程实现。具体程序见shift_test_2D.m,drawcirc.m,setfig.m,dtwavexfm2.m,dtwaveifm2.m,waveifm2.m,wavexfm2.mSkelMap.m。设和分别是双正交对偶尺度函数与对偶小波,,,和是相应的低通滤波器和高通滤波器,即它们满足实部:虚部:双树复小波变换可以通过离散小波变换DWT实现:一个DWT产生实部,另一个产生虚部。四、实现工具:Matlab五、程序代
2、码:(1)shift_test_2D.m:%shift_test_2D.m%%M-filetoperforma4-levelwavelettransformonacircleusingQ-shift%dualwavelettreeandDWT,andtocompareshiftinvarianceproperties.%%NickKingsbury,CambridgeUniversity,May2002.clearallcloseall%Drawacirculardisc.x=round((drawcirc(64,1,0,0,256)-0.5)*200);setfig(1
3、);colormap(gray(256))image(min(max(x+128,1),256));set(gca,'position',[0.10.25.25.5]);axis('off');axis('image');%draw(xx);title('Input(256x256)','FontSize',14);drawnow%Do4levelsofCWT.[Yl,Yh]=dtwavexfm2(x,4,'near_sym_b','qshift_b');%Looptoreconstructoutputfromcoefsateachlevelinturn.%Startsw
4、iththefinestlevel.titl=['1st';'2nd';'3rd';'4th';'Low'];yy=zeros(size(x).*[23]);yt1=1:size(x,1);yt2=1:size(x,2);formlev=1:5,mask=zeros(6,5);mask(:,mlev)=1;z=dtwaveifm2(Yl*mask(1,5),Yh,'near_sym_b','qshift_b',mask);figure;draw(z);drawnowyy(yt1,yt2)=z;yt2=yt2+size(x,2)/2;end%disp('Pressakey.
5、..')%pause%NowdosamewithDWT.%Do4levelsofRealDWTusing'antonini'(9,7)-tapfilters.[Yl,Yh]=wavexfm2(x,4,'antonini');yt1=[1:size(x,1)]+size(x,1);yt2=1:size(x,2);formlev=1:5,mask=zeros(3,5);mask(:,mlev)=1;z=waveifm2(Yl*mask(1,5),Yh,'antonini',mask);figure;draw(z);drawnowyy(yt1,yt2)=z;yt2=yt2+si
6、ze(x,2)/2;endfigure;setfig(gcf);colormap(gray(256))image(min(max(yy+128,1),256));set(gca,'position',[0.10.1.8.8]);axis('off');axis('image');holdonplot(128*[[1;1]*[1:4][0;6]]+1,128*[[0;4]*[1111][2;2]]+1,'-k');holdofftitle('Componentsofreconstructed''disc''images','FontSize',14);text(-0.01*
7、size(yy,2),0.25*size(yy,1),'DTCWT','horiz','r');text(0.02*size(yy,2),1.02*size(yy,1),'wavelets:','horiz','r','vert','t');text(-0.01*size(yy,2),0.75*size(yy,1),'DWT','horiz','r');fork=1:4,text(k*128-63,size(yy,1)*1.02,sprintf('level%d',k),'FontSize',14,'horiz','c','v