G1 <- G2 <- dnorm(seq(-512/4,512/4,length=512))
G <- 100 * zapsmall(G1 %o% G2)
J <- 6
G <- modwt.2d(G, "la8", J)
names.modwt <- c(t(sapply(c("LH","HL","HH"), paste, 1:J, sep="")),
paste("LL", J, sep=""))
n <- 50
par(mfrow=c(3,3), mar=c(5,4,4,2)/1.9, pty="s")
for(i in names.modwt[1:9])
image(G[[i]][256 + -n:n, 256 + -n:n], axes=FALSE, col=rainbow(128), main=i)
Gs <- shift.2d(G, "la8")
for(i in names.modwt[1:9])
image(Gs[[i]][256 + -n:n, 256 + -n:n], axes=FALSE, col=rainbow(128), main=i)
Run the code above in your browser using DataLab