⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 get_2dwavelet.m

📁 小波压缩编码平台软件包
💻 M
字号:
function W=get_2Dwavelet(wavelet,iter,type,pass1,pass2,plt)
%W = get_2Dwavelet(wavelet,iter,pass1,pass2,plt)
%Version: 2.10, Date: 2006/01/31, author: Nikola Sprljan
%Draws a 2D wavelet, as given by a separable 2D wavelet transform 
%
%Input: 
% wavelet - wavelet identification string
% iter - number of successive approximation iterations
% type - specifies wavelet
%         if (type == 'd') analysis (decomposition) filter
%         if (type == 'r') synthesis (reconstruction) filter
% pass1, pass2 - specifies which row-column combination to take
%                 if (pass1 == 'l' &  pass2 == 'l') then LL
%                 if (pass1 == 'l' &  pass2 == 'h') then LH
%                 if (pass1 == 'h' &  pass2 == 'l') then HL
%                 if (pass1 == 'h' &  pass2 == 'h') then HH
% plt - [optional, default = '']
%        if (plt == 'plot') then plots the wavelet
%
%Output: 
% W - 2D wavelet
%
%Uses: 
% get_wf.m (Wavelet Toolbox)
% get_scf.m (Wavelet Toolbox)
%
%Example:  
% get_2Dwavelet('CDF_9x7',5,'r','l','l','plot');
% get_2Dwavelet('LeGall_5x3',5,'d','l','l','plot');

if nargin<=4
    plt='';
end;
psi = []; %scaling function
phi = []; %wavelet function

if (pass1 == 'l')
    phi=get_scf(wavelet,iter,type);
    c1=phi; 
elseif (pass1=='h')
    psi=get_wf(wavelet,iter,type);
    c1=psi;
end;
if (pass2=='l') 
    if (isempty(phi)) 
        phi=get_scf(wavelet,iter,type);
    end;
    c2=phi; 
elseif (pass2 == 'h')
    if (isempty(psi)) 
        psi=get_wf(wavelet,iter,type);
    end;
    c2=psi;
end;

W=c1*c2';

if strcmp(plt,'plot')
    opengl autoselect;
    surfl(W);
    axis([0 size(W,1) 0 size(W,1) min(min(W)) max(max(W))]);
    set(gca,'FontSize',13);
    shading interp;
    colormap('copper');
    rotate3d on;
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -