Dualtree              package:waveslim              R Documentation

_D_u_a_l-_t_r_e_e _C_o_m_p_l_e_x _D_i_s_c_r_e_t_e _W_a_v_e_l_e_t _T_r_a_n_s_f_o_r_m

_D_e_s_c_r_i_p_t_i_o_n:

     One- and two-dimensional dual-tree complex discrete wavelet
     transforms developed by Kingsbury and Selesnick _et al._

_U_s_a_g_e:

     dualtree(x, J, Faf, af)
     idualtree(w, J, Fsf, sf)
     dualtree2D(x, J, Faf, af)
     idualtree2D(w, J, Fsf, sf)

_A_r_g_u_m_e_n_t_s:

       x: $N$-point vector or $M{\times}N$ matrix.

       w: DWT coefficients.

       J: number of stages.

     Faf: analysis filters for the first stage.

      af: analysis filters for the remaining stages.

     Fsf: synthesis filters for the last stage.

      sf: synthesis filters for the preceeding stages.

_D_e_t_a_i_l_s:

     In one dimension $N$ is divisible by $2^J$ and
     $N>=2^{J-1}\cdot\mbox{length}(\mbox{'af'})$.

     In two dimensions, these two conditions must hold for both $M$ and
     $N$.

_V_a_l_u_e:

     For the analysis of 'x', the output is 

       w: DWT coefficients.  Each wavelet scale is a list containing
          the real and imaginary parts.  The final scale ($J+1$)
          contains the low-pass filter coefficients.

       y: output signal

_A_u_t_h_o_r(_s):

     Matlab: S. Cai, K. Li and I. Selesnick; R port: B. Whitcher

_R_e_f_e_r_e_n_c_e_s:

     WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY <URL:
     http://taco.poly.edu/WaveletSoftware/>

_S_e_e _A_l_s_o:

     'FSfarras', 'farras', 'convolve', 'cshift', 'afb', 'sfb'.

_E_x_a_m_p_l_e_s:

     ## EXAMPLE: dualtree
     x = rnorm(512)
     J = 4
     Faf = FSfarras()$af
     Fsf = FSfarras()$sf
     af = dualfilt1()$af
     sf = dualfilt1()$sf
     w = dualtree(x, J, Faf, af)
     y = idualtree(w, J, Fsf, sf)
     err = x - y
     max(abs(err))

     ## Example: dualtree2D
     x = matrix(rnorm(64*64), 64, 64)
     J = 3
     Faf = FSfarras()$af
     Fsf = FSfarras()$sf
     af = dualfilt1()$af
     sf = dualfilt1()$sf
     w = dualtree2D(x, J, Faf, af)
     y = idualtree2D(w, J, Fsf, sf)
     err = x - y
     max(abs(err))

     ## Display 2D wavelets of dualtree2D.m

     J <- 4
     L <- 3 * 2^(J+1)
     N <- L / 2^J
     Faf <- FSfarras()$af
     Fsf <- FSfarras()$sf
     af <- dualfilt1()$af
     sf <- dualfilt1()$sf
     x <- matrix(0, 2*L, 3*L)
     w <- dualtree2D(x, J, Faf, af)
     w[[J]][[1]][[1]][N/2, N/2+0*N] <- 1
     w[[J]][[1]][[2]][N/2, N/2+1*N] <- 1
     w[[J]][[1]][[3]][N/2, N/2+2*N] <- 1
     w[[J]][[2]][[1]][N/2+N, N/2+0*N] <- 1
     w[[J]][[2]][[2]][N/2+N, N/2+1*N] <- 1
     w[[J]][[2]][[3]][N/2+N, N/2+2*N] <- 1
     y <- idualtree2D(w, J, Fsf, sf)
     image(t(y), col=grey(0:64/64), axes=FALSE)

