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

Download this file

wfilt_hden.m    108 lines (95 with data), 3.1 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
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
function [h,g,a] = wfilt_hden(N)
%WFILT_HDEN Higher DENsity dwt filters (tight frame, frame)
% Usage: [h,g,a] = wfilt_hden(N);
%
% `[h,g,a]=wfilt_hden(N)` computes Higher DENsity dwt filters (tight frame, frame).
%
% References: selesnick2006higher
%
% Examples:
% ---------
%
% Frequency responses of the analysis filters:::
%
% w = fwtinit({'hden',3});
% wtfftfreqz(w.h);
%
a= [2;2;1];
switch(N)
case 1
% from the paper Example 1.
harr = [
0 0 0
0.353553390593274 0.353553390593274 0.5
0.707106781186548 0 -0.5
0.353553390593274 -0.353553390593274 0
];
case 2
% from the paper Example 2.
harr = [
0 0 0
0.189604909379 0.025752563665 0.010167956157
0.631450512121 0.075463998066 0.046750380120
0.655505518357 -0.064333341412 -0.009172584871
0.099615139800 -0.327704691428 -0.354664087684
-0.163756210215 0.228185687127 0.499004628714
-0.023958870736 0.252240693362 -0.192086292435
0.025752563665 -0.189604909379 0
];
case 3
% from the paper Example 3.
harr = [
0 0 0
0.022033327573 0.048477254777 0.031294135831
0.015381522616 0.019991451948 0.013248398005
-0.088169084245 -0.304530024033 -0.311552292833
0.051120949834 0.165478923930 0.497594326648
0.574161374258 0.308884916012 -0.235117092484
0.717567366340 -0.214155508410 -0.020594576659
0.247558418377 -0.074865474330 0.015375249485
-0.076963057605 0.028685132531 0.009751852004
-0.048477254777 0.022033327573 0
];
case 4
% from the paper Example 5. Is not a tight frame!
harr = [
0 0 0
0 0 0
0.027222 0.044889 0
0.011217 0.005671 0.027671
-0.112709 -0.286349 0.007159
0.096078 0.235789 -0.277671
0.685299 0.235789 0.485682
0.685299 -0.286349 -0.277671
0.096078 0.005671 0.007159
-0.112709 0.044889 0.027671
0.011217 0 0
0.027222 0 0
];
h=mat2cell(harr.',[1,1,1],length(harr));
if(nargout>1)
garr = [
0 0 0
-0.039237 0.023794 0.011029
-0.073518 0.037784 0.019204
0.181733 -0.070538 -0.020024
0.638129 -0.253037 -0.269204
0.638129 0.261996 0.517991
0.181733 0.261996 -0.269204
-0.073518 -0.253037 -0.020024
-0.039237 -0.070538 0.019204
0 0.037784 0.011029
0 0.023794 0
0 0 0
];
g=mat2cell(garr.',[1,1,1],length(harr));
end;
return
otherwise
error('%s: No such Higher Density Wavelet Transform Filters..',upper(mfilename));
end
h=mat2cell(harr.',[1,1,1],length(harr));
if(nargout>1)
garr = harr(end:-1:1, :);
g=mat2cell(garr.',[1,1,1],length(harr));
end