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

📄 idwt_lifting1d.m

📁 小波压缩编码平台软件包
💻 M
字号:
function y = idwt_lifting1D(a,d,wvf)
%y = idwt_lifting1D(a,d,s,K)
%Version: 1.10, Date: 2006/11/01, author: Nikola Sprljan
%IDWT of a 1D signal in lifting implementation
%
%Input:
% a - approximation (low-pass) signal
% d - detail (high-pass) signal
% wvf - wavelet identification string, or wavelet data structure
%     
%Output: 
% y - reconstructed signal
%
%Example:
% y = idwt_lifting1D(a,d,wvf);
% y = idwt_lifting1D(a,d,'CDF_9x7');

if ischar(wvf)
    wvf = load_wavelet(wvf);
end; 
s = wvf.lift_coeff;
K = wvf.lift_norm;
cn = wvf.lift_cnct;

%xe - for 1-pixel extended signal
xe = zeros(1,length(a)+length(d)+2);
%undo the normalisation
xe(2:2:end-1) = a / K(1);
xe(3:2:end-1) = d / K(2);
for i=length(s):-1:1   
    xe(1) = xe(3); %extension on the left
    xe(end) = xe(end-2); %extension on the right
    start = rem(i,2); %determines if it is prediction or update step, 1 - prediction, 0 - update
    lind = 1+start:2:length(xe)-2;
    cind = lind + 1;
    rind = cind + 1;
    if (cn(i,1) == '1') %left connection present
        xe(cind) = xe(cind) - s(i)*xe(lind); %left pixel lifting
    end;
    if (cn(i,2) == '1') %right connection present
        xe(cind) = xe(cind) - s(i)*xe(rind); %right pixel lifting
    end;
end;
y = xe(2:end-1);

⌨️ 快捷键说明

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