waverec2

2-D wavelet reconstruction

    Description

    example

    x = waverec2(c,s,wname) performs a multilevel wavelet reconstruction of the matrix x based on the wavelet decomposition structure [c,s] and the wavelet specified by wname. See wavedec2.

    x = waverec2(c,s,wname) is equivalent to x = appcoef2(c,s,wname,0).

    x = waverec2(c,s,LoR,HiR) reconstructs x using the specified lowpass and highpass wavelet reconstruction filters LoR and HiR, respectively.

    Examples

    collapse all

    Load an image.

    load woman

    Perform a level 2 wavelet decomposition of the image using the sym4 wavelet.

    wv = 'sym4';
    [c,s] = wavedec2(X,2,wv);

    Reconstruct the image from the wavelet decomposition structure.

    xrec = waverec2(c,s,wv);

    Check for perfect reconstruction.

    max(abs(X(:)-xrec(:)))
    ans = 2.0989e-10
    

    Input Arguments

    collapse all

    Wavelet decomposition vector, specified as a real-valued vector. The vector c contains the approximation and detail coefficients organized by level. The bookkeeping matrix s is used to parse c. See wavedec2.

    Data Types: single | double

    Bookkeeping matrix, specified as an integer-valued matrix. The matrix s contains the dimensions of the wavelet coefficients by level and is used to parse the wavelet decomposition vector c. See wavedec2.

    Data Types: single | double

    Analyzing wavelet, specified as a character vector or string scalar.

    Note

    waverec2 supports only Type 1 (orthogonal) or Type 2 (biorthogonal) wavelets. See wfilters for a list of orthogonal and biorthogonal wavelets.

    Wavelet reconstruction filters, specified as a pair of even-length real-valued vectors. LoR is the lowpass reconstruction filter, and HiR is the highpass reconstruction filter. The lengths of LoR and HiR must be equal. See wfilters for additional information.

    Tips

    • If c and s are obtained from an indexed image analysis or a truecolor image analysis, x is an m-by-n matrix or an m-by-n-by-3 array, respectively.

      For more information on image formats, see the image and imfinfo reference pages.

    Extended Capabilities

    See Also

    | |

    Introduced before R2006a