Accelerating the pace of engineering and science

# ilwt2

Inverse 2-D lifting wavelet transform

## Syntax

X = ilwt2(CA,CH,CV,CD,W)
X = ILWT2(CA,CH,CV,CD,W,LEVEL)
X = ilwt2(CA,CH,CV,CD,W,LEVEL,'typeDEC',typeDEC)

## Description

ilwt2 performs a 2-D lifting wavelet reconstruction with respect to a particular lifted wavelet that you specify.

X = ilwt2(AD_In_Place,W) computes the reconstructed matrix X using the approximation and detail coefficients matrix AD_In_Place, obtained by a lifting wavelet decomposition. W is a lifted wavelet name (see liftwave).

X = ilwt2(CA,CH,CV,CD,W) computes the reconstructed matrix X using the approximation coefficients vector CA and detail coefficients vectors CH, CV, and CD obtained by a lifting wavelet decomposition.

X = ilwt2(AD_In_Place,W,LEVEL) or X = ILWT2(CA,CH,CV,CD,W,LEVEL) computes the lifting wavelet reconstruction, at level LEVEL.

X = ilwt2(AD_In_Place,W,LEVEL,'typeDEC',typeDEC) or X = ilwt2(CA,CH,CV,CD,W,LEVEL,'typeDEC',typeDEC) with typeDEC = 'w' or 'wp' computes the wavelet or the wavelet packet decomposition using lifting, at level LEVEL.

Instead of a lifted wavelet name, you may use the associated lifting scheme LS: X = ilwt2(...,LS,...) instead of X = ilwt2(...,W,...).

## Examples

```% Start from the Haar wavelet and get the
% corresponding lifting scheme.
lshaar = liftwave('haar');

% Add a primal ELS to the lifting scheme.
els = {'p',[-0.125 0.125],0};

% Perform LWT at level 1 of a simple image.
x = reshape(1:16,4,4);
[cA,cH,cV,cD] = lwt2(x,lsnew);

% Perform integer LWT of the same image.
lshaarInt = liftwave('haar','int2int');
[cAint,cHint,cVint,cDint] = lwt2(x,lsnewInt);

% Invert the two transforms.
xRec = ilwt2(cA,cH,cV,cD,lsnew);
err = max(max(abs(x-xRec)))

err =

0

xRecInt = ilwt2(cAint,cHint,cVint,cDint,lsnewInt);
errInt = max(max(abs(x-xRecInt)))

errInt =

0
```