Single-level inverse discrete 1-D wavelet transform.
Syntax
X = idwt(cA,cD,'wname')
X = idwt(cA,cD,Lo_R,Hi_R)
X = idwt(cA,cD,'wname',L)
X = idwt(cA,cD,Lo_R,Hi_R,L)
Description
The idwt command performs a single-level one-dimensional wavelet reconstruction with respect to either a particular wavelet ('wname', see wfilters) or particular wavelet reconstruction filters (Lo_R and Hi_R) you specify.
X = idwt(cA,cD,'wname') returns the single-level reconstructed approximation coefficients vector X based on approximation and detail coefficients vectors cA and cD, and using the wavelet 'wname'.
X = idwt(cA,cD,Lo_R,Hi_R)reconstructs as above using filters you specify:
Lo_R and Hi_R must be the same length. If la is the length of cA (which also equals the length of cD) and lf is the length of the filters Lo_R and Hi_R, then length(X) = 2*la-lf+2.
X = idwt(cA,cD,'wname',L) or X = idwt(cA,cD,Lo_R,Hi_R,L), returns the length-L central portion of the result obtained using idwt(cA,cD,'wname'). L must be less than 2*la-lf+2.
Examples
idwt is the inverse function of dwt in the sense that the abstract statement
idwt(dwt(X,'wname'),'wname') gives back X. Consider this example.
% Construct elementary one-dimensional signal s.
randn('seed',531316785)
s = 2 + kron(ones(1,8),[1 -1]) + ...
((1:16).^2)/32 + 0.2*randn(1,16);
% Perform single-level dwt of s using db2.
[ca1,cd1] = dwt(s,'db2');
subplot(221); plot(ca1);
title('Approx. coef. for db2');
subplot(222); plot(cd1);
title('Detail coef. for db2');
% Perform single-level inverse discrete wavelet transform,
% illustrating that idwt is the inverse function of dwt.
ss = idwt(ca1,cd1,'db2');
err = norm(s-ss); % Check reconstruction.
subplot(212); plot([s;ss]');
title('Original and reconstructed signals');
xlabel(['Error norm = ',num2str(err)])
% For a given wavelet, compute the two associated
% reconstruction filters and inverse transform using
% the filters directly.
[Lo_R,Hi_R] = wfilters('db2','r');
ss = idwt(ca1,cd1,Lo_R,Hi_R);
Algorithm
Starting from the approximation and detail coefficients at level j, cAj and cDj, the inverse discrete wavelet transform reconstructs cAj-1, inverting the decomposition step by inserting zeros and convolving the results with the reconstruction filters.

See Also
dwt, idwtper, upwlev
References
I. Daubechies (1992), "Ten lectures on wavelets," CBMS-NSF conference series in applied mathematics. SIAM Ed.
S. Mallat (1989), "A theory for multiresolution signal decomposition: the wavelet representation," IEEE Pattern Anal. and Machine Intell., vol. 11, no. 7, pp 674-693.
Y. Meyer (1990), "Ondelettes et opérateurs," Tome 1, Hermann Ed. (English translation: Wavelets and operators, Cambridge Univ. Press. 1993.)
[ Previous | Help Desk | Next ]