modwt.2d: Two-Dimensional Maximal Overlap Discrete Wavelet Transform

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Performs a separable two-dimensional maximal overlap discrete wavelet transform (MODWT) on a matrix of arbitrary dimensions.

Usage

1
2
modwt.2d(x, wf, J = 4, boundary = "periodic")
imodwt.2d(y)

Arguments

x

input matrix

wf

name of the wavelet filter to use in the decomposition

J

depth of the decomposition

boundary

only "periodic" is currently implemented

y

an object of class dwt.2d

Details

See references.

Value

List structure containing the 3J+1 sub-matrices from the decomposition.

Author(s)

B. Whitcher

References

Liang, J. and T. W. Parks (1994) A two-dimensional translation invariant wavelet representation and its applications, Proceedings ICIP-94, Vol. 1, 66-70.

Liang, J. and T. W. Parks (1994) Image coding using translation invariant wavelet transforms with symmetric extensions, IEEE Transactions on Image Processing, 7, No. 5, 762-769.

See Also

dwt.2d, shift.2d.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## Xbox image
data(xbox)
xbox.modwt <- modwt.2d(xbox, "haar", 2)
## Level 1 decomposition
par(mfrow=c(2,2), pty="s")
image(xbox.modwt$LH1, col=rainbow(128), axes=FALSE, main="LH1")
image(xbox.modwt$HH1, col=rainbow(128), axes=FALSE, main="HH1")
frame()
image(xbox.modwt$HL1, col=rainbow(128), axes=FALSE, main="HL1")
## Level 2 decomposition
par(mfrow=c(2,2), pty="s")
image(xbox.modwt$LH2, col=rainbow(128), axes=FALSE, main="LH2")
image(xbox.modwt$HH2, col=rainbow(128), axes=FALSE, main="HH2")
image(xbox.modwt$LL2, col=rainbow(128), axes=FALSE, main="LL2")
image(xbox.modwt$HL2, col=rainbow(128), axes=FALSE, main="HL2")
sum((xbox - imodwt.2d(xbox.modwt))^2)

data(dau)
par(mfrow=c(1,1), pty="s")
image(dau, col=rainbow(128), axes=FALSE, main="Ingrid Daubechies")
sum(dau^2)
dau.modwt <- modwt.2d(dau, "d4", 2)
## Level 1 decomposition
par(mfrow=c(2,2), pty="s")
image(dau.modwt$LH1, col=rainbow(128), axes=FALSE, main="LH1")
image(dau.modwt$HH1, col=rainbow(128), axes=FALSE, main="HH1")
frame()
image(dau.modwt$HL1, col=rainbow(128), axes=FALSE, main="HL1")
## Level 2 decomposition
par(mfrow=c(2,2), pty="s")
image(dau.modwt$LH2, col=rainbow(128), axes=FALSE, main="LH2")
image(dau.modwt$HH2, col=rainbow(128), axes=FALSE, main="HH2")
image(dau.modwt$LL2, col=rainbow(128), axes=FALSE, main="LL2")
image(dau.modwt$HL2, col=rainbow(128), axes=FALSE, main="HL2")
sum((dau - imodwt.2d(dau.modwt))^2)

Example output

waveslim: Wavelet Method for 1/2/3D Signals (version = 1.7.5)

[1] 0
[1] 1049732962
[1] 0

waveslim documentation built on May 2, 2019, 4:41 p.m.

Related to modwt.2d in waveslim...