]> AND Private Git Repository - these_gilles.git/blob - THESE/codes/wave/allcode/dwt3D.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
07 sep
[these_gilles.git] / THESE / codes / wave / allcode / dwt3D.m
1 function w = dwt3D(x, J, af)
2
3 % 3-D Discrete Wavelet Transform
4 %
5 % USAGE:
6 %   w = dwt3D(x, stages, af)
7 % INPUT:
8 %   x - N1 by N2 by N3 matrix
9 %       1) Ni all even
10 %       2) min(Ni) >= 2^(J-1)*length(af)
11 %   J - number of stages
12 %   af  - analysis filters
13 % OUTPUT:
14 %   w - cell array of wavelet coefficients
15 % EXAMPLE:
16 %   [af, sf] = farras;
17 %   x = rand(128,64,64);
18 %   w = dwt3D(x,3,af);
19 %   y = idwt3D(w,3,sf);
20 %   err = x-y; 
21 %   max(max(max(abs(err))))
22 %
23 % WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY
24 % http://taco.poly.edu/WaveletSoftware/
25
26 for k = 1:J
27     [x w{k}] = afb3D(x, af, af, af);
28 end
29 w{J+1} = x;
30