Wavelet Toolbox
appcoef2

Extract 2-D approximation coefficients

Syntax

• ```A = appcoef2(C,S,'`wname`',N)
A = appcoef2(C,S,'`wname`')
A = appcoef2(C,S,Lo_R,Hi_R)
A = appcoef2(C,S,Lo_R,Hi_R,N)
```

Description

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

`appcoef2` computes the approximation coefficients of a two-dimensional signal.

`A = appcoef2(C,S,`'`wname`'`,N)` computes the approximation coefficients at level `N` using the wavelet decomposition structure `[C,S]` (see `wavedec2` for more information).

'`wname`' is a string containing the wavelet name. Level `N` must be an integer such that `0 `` N `` size(S,1)-2`.

`A = appcoef2(C,S,`'`wname`'`)` extracts the approximation coefficients at the last level: `size(S,1)-2`.

Instead of giving the wavelet name, you can give the filters.

For` A = appcoef2(C,S,Lo_R,Hi_R)` or `A = appcoef2(C,S,Lo_R,Hi_R,N)`, `Lo_R` is the reconstruction low-pass filter and `Hi_R` is the reconstruction high-pass filter (see `wfilters` for more information).

Examples

• ```% The current extension mode is zero-padding (see `dwtmode`).

% X contains the loaded image.

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

sizec = size(c)

sizec =
1     65536
val_s = s

val_s =
64     64
64     64
128    128
256    256

% Extract approximation coefficients
% at level 2.
ca2 = appcoef2(c,s,'db1',2);
sizeca2 = size(ca2)

sizeca2 =
64     64

% Compute approximation coefficients
% at level 1.
ca1 = appcoef2(c,s,'db1',1);
sizeca1 = size(ca1)

sizeca1 =
128    128
```

Algorithm

The algorithm is built on the same principle as `appcoef`.

`detcoef2`, ```wavedec2 ```