小波实验报告双树复小波变换

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

(
j,
n)
arctan
dg dh
( (
j, j,
n) n)
2. 代码实现。
我采用 Matlab 函数编程实现。具体程序见 shift_test_2D.m,drawcirc.m,setfig.m,
dtwavexfm2.m,dtwaveifm2.m,waveifm2.m,wavexfm2.m
SkelMap.m。
% Loop to reconstruct output from coefs at each level in turn. % Starts with the finest level. titl = ['1st';'2nd';'3rd';'4th';'Low'];
yy = zeros(size(x) .* [2 3]); yt1 = 1:size(x,1); yt2 = 1:size(x,2);
.
.
yy(yt1,yt2) = z; yt2 = yt2 + size(x,2)/2; end
figure; setfig(gcf); colormap(gray(256)) image(min(max(yy+128,1),256)); set(gca,'position',[0.1 0.1 .8 .8]); axis('off'); axis('image'); hold on plot(128*[[1;1]*[1:4] [0;6]]+1,128*[[0;4]*[1 1 1 1] [2;2]]+1,'-k'); hold off
for mlev = 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);drawnow
yy(yt1,yt2) = z; yt2 = yt2 + size(x,2)/2; end
.
一、题目:双树复小波变换
二、目的:双树复小波和实小波变换的比较
三、算法及其实现:提取阶梯型边界点
1Hale Waihona Puke Baidu 算法。
c (t) h (t) j g (t) f , c f , h j f , g
幅值: | dc ( j, n) | [dh ( j, n)]2 [dg ( j, n)]2
相位:
dc
设 h ,h和 h , h 分别是双正交对偶尺度函数与对偶小波,h0 n ,h0 n ,h1 n
和 h1 n 是相应的低通滤波器和高通滤波器,即它们满足
实部: h (t) 2 h0 (n)h (2t n) 虚部:g (t) 2 g0 (n)g (2t n)
n
n
h (t) 2 h1(n)h (2t n) n
clear all close all
% Draw a circular disc. x = round((drawcirc(64,1,0,0,256) - 0.5) * 200); setfig(1); colormap(gray(256)) image(min(max(x+128,1),256)); set(gca,'position',[0.1 0.25 .25 .5]);
yt1 = [1:size(x,1)] + size(x,1); yt2 = 1:size(x,2);
for mlev = 1:5, mask = zeros(3,5); mask(:,mlev) = 1; z = waveifm2(Yl*mask(1,5),Yh,'antonini',mask); figure;draw(z);drawnow
% disp('Press a key ...') % pause
% Now do same with DWT.
% Do 4 levels of Real DWT using 'antonini' (9,7)-tap filters. [Yl,Yh] = wavexfm2(x,4,'antonini');
g (t) 2 g1(n)g (2t n) n
h (t) 2 h0 (n)h (2t n) n
g (t) 2 g0 (n)g (2t n) n
h (t) 2 h1(n)h (2t n) n
g (t) 2 g1(n)g (2t n) n
双树复小波变换可以通过离散小波变换 DWT 实现:一个 DWT 产生实部,另一个
.
.
axis('off'); axis('image');
% draw(xx); title('Input (256 x 256)','FontSize',14); drawnow
% Do 4 levels of CWT. [Yl,Yh] = dtwavexfm2(x,4,'near_sym_b','qshift_b');
title('Components of reconstructed ''disc'' images','FontSize',14); text(-0.01*size(yy,2),0.25*size(yy,1),'DT CWT','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'); for k=1:4, text(k*128-63,size(yy,1)*1.02,sprintf('level %d',k),'FontSize',14,'horiz','c','vert','t'); end text(5*128+1,size(yy,1)*1.02,'level 4 scaling fn.','FontSize',14,'horiz','c','vert','t'); drawnow % print -deps circrecq.eps
产生虚部。
四、实现工具:Matlab 五、程序代码:
(1)shift_test_2D.m: % shift_test_2D.m % % M-file to perform a 4-level wavelet transform on a circle using Q-shift % dual wavelet tree and DWT, and to compare shift invariance properties. % % Nick Kingsbury, Cambridge University, May 2002.
相关文档
最新文档