[95fe2b]: wavelets / wfilt_dtree.m Maximize Restore History

Download this file

wfilt_dtree.m    85 lines (78 with data), 2.3 kB

 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
function [h,g,a] = wfilt_dtree(N)
%WFILT_DTREE Dual-TREE complex wavelet transform filters
% Usage: [h,g,a] = wfilt_dtree(N);
%
% `[h,g,a]=wfilt_dtree(N)` computes filters used in the dual-tree complex wavelet transform.
%
% Examples:
% ---------
%
% Frequency responses of the analysis filters:::
%
% w = fwtinit({'dtree',1});
% wtfftfreqz(w.h);
%
% References: selesnick2005dtree
%
switch(N)
case 1
harr = [
0 0
-0.08838834764832 -0.01122679215254
0.08838834764832 0.01122679215254
0.69587998903400 0.08838834764832
0.69587998903400 0.08838834764832
0.08838834764832 -0.69587998903400
-0.08838834764832 0.69587998903400
0.01122679215254 -0.08838834764832
0.01122679215254 -0.08838834764832
0 0
];
case 2
harr = [
0.01122679215254 0
0.01122679215254 0
-0.08838834764832 -0.08838834764832
0.08838834764832 -0.08838834764832
0.69587998903400 0.69587998903400
0.69587998903400 -0.69587998903400
0.08838834764832 0.08838834764832
-0.08838834764832 0.08838834764832
0 0.01122679215254
0 -0.01122679215254
];
case 3
harr = [
0.03516384000000 0
0 0
-0.08832942000000 -0.11430184000000
0.23389032000000 0
0.76027237000000 0.58751830000000
0.58751830000000 -0.76027237000000
0 0.23389032000000
-0.11430184000000 0.08832942000000
0 0
0 -0.03516384000000
];
case 4
harr = [
0 -0.03516384000000
0 0
-0.11430184000000 0.08832942000000
0 0.23389032000000
0.58751830000000 -0.76027237000000
0.76027237000000 0.58751830000000
0.23389032000000 0
-0.08832942000000 -0.11430184000000
0 0
0.03516384000000 0
];
otherwise
error('%s: No such Dual-Tree Complex Wavelet Transform Filters..',upper(mfilename));
end
a= [2;2];
h=mat2cell(harr.',[1,1],length(harr));
if(nargout>1)
garr = harr(end:-1:1, :);
g=mat2cell(garr.',[1,1],length(garr));
end