R: Multiresolution Analysis of an Image

mra.2d {waveslim} | R Documentation

## Multiresolution Analysis of an Image

### Description

This function performs a level J additive decomposition of the input matrix or image using the pyramid algorithm (Mallat 1989).

### Usage

    mra.2d(x, wf = "la8", J = 4, method = "modwt", boundary = "periodic")

### Arguments

`x` | A matrix or image containing the data be to decomposed. This must be have dyadic length in both dimensions (but not necessarily the same) for `method="dwt"`.
`wf` | Name of the wavelet filter to use in the decomposition. By default this is set to `"la8"`, the Daubechies orthonormal compactly supported wavelet of length L=8 least asymmetric family.
`J` | Specifies the depth of the decomposition. This must be a number less than or equal to log(length(x),2).
`method` | Either `"dwt"` or `"modwt"`.
`boundary` | Character string specifying the boundary condition. If `boundary=="periodic"` the default, then the matrix you decompose is assumed to be periodic on its defined interval, if `boundary=="reflection"`, the matrix beyond its boundaries is assumed to be a symmetric reflection of itself.

### Details

This code implements a two-dimensional multiresolution analysis by performing the one-dimensional pyramid algorithm (Mallat 1989) on the rows and columns of the input matrix. Either the DWT or MODWT may be used to compute the multiresolution analysis, which is an additive decomposition of the original matrix (image).

### Value

Basically, a list with the following components

`LH?` | Wavelet detail image in the horizontal direction.
`HL?` | Wavelet detail image in the vertical direction.
`HH?` | Wavelet detail image in the diagonal direction.
`LLJ` | Wavelet smooth image at the coarsest resolution.
`J` | Depth of the wavelet transform.
`wavelet` | Name of the wavelet filter used.
`boundary` | How the boundaries were handled.

### Author(s)

B. Whitcher

### References

Mallat, S. G. (1989) A theory for multiresolution signal decomposition: the wavelet representation, IEEE Transactions on Pattern Analysis and Machine Intelligence, 11, No. 7, 674-693.

Mallat, S. G. (1998) A Wavelet Tour of Signal Processing, Academic Press.

### See Also

`dwt.2d`, `modwt.2d`

### Examples

    ## Easy check to see if it works...
    ## --------------------------------

    x <- matrix(rnorm(32*32), 32, 32)
    # MODWT
    x.mra <- mra.2d(x, method="modwt")
    x.mra.sum <- x.mra[[1]]
    for(j in 2:length(x.mra))
      x.mra.sum <- x.mra.sum + x.mra[[j]]
    sum((x - x.mra.sum)^2)

    # DWT
    x.mra <- mra.2d(x, method="dwt")
    x.mra.sum <- x.mra[[1]]
    for(j in 2:length(x.mra))
      x.mra.sum <- x.mra.sum + x.mra[[j]]
    sum((x - x.mra.sum)^2)

[Package waveslim version 1.8.2 Index]