1 function w = dualtree2D(x, J, Faf, af)
3 % 2D Dual-Tree Discrete Wavelet Transform
6 % w = dualtree2D(x, J, Faf, af)
10 % Faf - first stage filters
11 % af - filters for remaining stages
13 % w{j}{d1}{d2} - DWT coefficients
14 % j = 1..J, k = 1..2, d = 1..3
15 % w{J+1}{k} - lowpass coefficients
20 % [Faf, Fsf] = FSfarras;
21 % [af, sf] = dualfilt1;
22 % w = dualtree2D(x, J, Faf, af);
23 % y = idualtree2D(w, J, Fsf, sf);
27 % WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY
28 % http://taco.poly.edu/WaveletSoftware/
34 [x1 w{1}{1}] = afb2D(x, Faf{1}); % stage 1
36 [x1 w{j}{1}] = afb2D(x1, af{1}); % remaining stages
38 w{J+1}{1} = x1; % lowpass subband
41 [x2 w{1}{2}] = afb2D(x, Faf{2}); % stage 1
43 [x2 w{j}{2}] = afb2D(x2, af{2}); % remaining stages
45 w{J+1}{2} = x2; % lowpass subband
52 w{j}{1}{m} = (A+B)/sqrt(2);
53 w{j}{2}{m} = (A-B)/sqrt(2);