| Wavelet Toolbox | Search  Help Desk |
| idwt2 | Examples See Also |
Single-level inverse discrete 2-D wavelet transform.
X = idwt2(cA,cH,cV,cD,'Thewname') X = idwt2(cA,cH,cV,cD,Lo_R,Hi_R) X = idwt2(cA,cH,cV,cD,'wname',S) X = idwt2(cA,cH,cV,cD,Lo_R,Hi_R,S)
idwt2 command performs a single-level two-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 = idwt2(cA,cH,cV,cD,'wname') uses the wavelet 'wname' to compute the single-level reconstructed approximation coefficients vector X based on approximation vector cA and (horizontal, vertical, and diagonal) detail vectors cH,cV and cD.
X = idwt2(cA,cH,cV,cD,Lo_R,Hi_R) reconstructs as above, using filters you specify:
Lo_R is the reconstruction low-pass filter
Hi_R is the reconstruction high-pass filter
Lo_R and Hi_R must be the same length.
If sa = size(cA) = size(cH) = size(cV) = size(cD) and lf is the length of the filters, then size(X) = 2*size(cA)-lf+2.
X = idwt2(cA,cH,cV,cD,'wname',S) and X = idwt2(cA,cH,cV,cD,Lo_R,Hi_R,S) return the size S central portion of the result obtained using the syntax idwt2(cA,cH,cV,cD,'wname'). S must be less than 2*size(cA)-lf+2.
idwt2 is the inverse function of dwt2 in the sense that the abstract statement idwt2(dwt2(X,'wname'),'wname') gives back X. Consider this example.
% Load original image.
load woman;
% X contains the loaded image.
sX = size(X);
% Perform single-level decomposition
% of X using db4.
[cA1,cH1,cV1,cD1] = dwt2(X,'db4');
% Invert directly decomposition of X
% using coefficients at level 1.
A0 = idwt2(cA1,cH1,cV1,cD1,'db4',sX);
% Check for perfect reconstruction.
max(max(X-A0))
ans =
3.3032e-10
dwt2, idwtper2, upwlev2