Wavelet Toolbox
waverec2

Multilevel 2-D wavelet reconstruction

Syntax

• ```X = waverec2(C,S,'`wname`')
X = waverec2(C,S,Lo_R,Hi_R)
```

Description

`waverec2` is a two-dimensional wavelet analysis function.

`X = waverec2(C,S,`'`wname`'`)` performs a multilevel wavelet reconstruction of the matrix `X` based on the wavelet decomposition structure `[C,S]` (for detailed storage information, see `wavedec2`). '`wname`' is a string containing the name of the wavelet (see `wfilters` for more information).

Instead of giving the wavelet name, you can give the filters. For `X = waverec2(C,S,Lo_R,Hi_R)`, `Lo_R` is the reconstruction low-pass filter and `Hi_R` is the reconstruction high-pass filter.

`waverec2` is the inverse function of `wavedec2` in the sense that the abstract statement `waverec2(wavedec2(X,N,`'`wname`'`),`'`wname`'`)` would give back `X`.

Remarks

Note that `X = waverec2(C,S,`'`wname`'`)` is equivalent to `X = appcoef2(C,S,`'`wname`'`,0)`.

Examples

• ```% The current extension mode is zero-padding (see `dwtmode`).
% X contains the loaded image.

% Perform decomposition at level 2
% of X using sym4.
[c,s] = wavedec2(X,2,'sym4');

% Reconstruct X from the wavelet
% decomposition structure [c,s].
a0 = waverec2(c,s,'sym4');

% Check for perfect reconstruction.
max(max(abs(X-a0)))
ans =
2.5565e-10
```

```appcoef2, idwt2, wavedec2 ```