📄 coef.m
字号:
function [L,H]=coef(flt)
%[L,H]=coef(flt)
%
% This function returns coefficients of given scalar or matrix filter bank.
% Notice that sometimes zero coefficients are added in the beginning of
% a filter. This ensures correct shift of the synthesis filter against
% analysis one. For details see [SW].
%
% Input:
% flt string of characters, name of the filter; for admissible
% names and brief descriptions of filters see below
%
% Output:
% L 这是低通滤波器的系数:
% r by r*l real array, low-pass (scaling) filter;
% r is the number of scaling functions,
% l is the number of terms in the dilation equation;
% coefficients in L are organized as follows: L=[C1 C2 ... Cl]//C1...Cl是r*r的矩阵
%
% H 这是高通滤波器的系数:
% r by r*m real array, high-pass (wavelet) filter;
% m is the number of terms in the wavelet equation;
% coefficients in H are organized as follows: H=[D1 D2 ... Dm]
%
% Admissible Names of the Filters and Brief Description of Correspoding Basis:
% r is the number of scaling an wavelet functions,//r是维数
% l is the number of scaling coefficients, //l是低通滤波器系数的个数
% m is the number of wavelet coefficients, //m是高通滤波器系数的个数
% A is the approximation order, see [HSS], //A是逼近阶
% S is the lower bound of Sobolev smoothness, see [D], [J])
%
% 'haar' Haar 2 coefficient orthogonal symmetric scalar filter bank
% (see [D]); r=1, l=2, m=2, A=1, S=0.4999
% 'd4' Daubechies 4 coefficient orthogonal scalar filter bank (see [D]);
% r=1, l=4, m=4, A=2, S=0.9999
% 'la8' Daubechies 8 coefficient least asymmetric orthogonal scalar
% filter bank (see [D]); r=1, l=8, m=8, A=4, S=1.7757
%
%%%%%%%%%以下是双正交小波%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'bi9' 9/7 coefficient symmetric biorthogonal scalar filter bank,//这个小波常用来作为编码的比较标准
% dual to 'bi7' (see [D]); r=1, l=9, m=7, A=4, S=1.4101
% 'bi7' 7/9 coefficient symmetric biorthogonal scalar filter bank,
% dual to 'bi9' (see [D]); r=1, l=7, m=9, A=4, S=2.1226
%
%
% 'bi5' 5/3 coefficient symmetric biorthogonal scalar filter bank,
% dual to 'bi3' (see [D]); r=1, l=5, m=3, A=2, S=0.4408
% 'bi3' 3/5 coefficient symmetric biorthogonal scalar filter bank,
% dual to 'bi5' (see [D]); r=1, l=3, m=5, A=2, S=1.4999
%
%%%%%%%%%以下是多重小波%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'ghm' Geronimo-Hardin-Massopust orthogonal symmetric multi-filter bank
% (see [GHM], [SS]); r=2, l=4, m=4, A=2, S=1.4999
% 'cl' Chui-Lian orthogonal symmetric multi-filter bank (see [CL]);//这个多重小波长用来做编码
% r=2, l=3, m=3, A=2, S=1.0545
% 'sa4' orthogonal symmetric multi-filter bank constructed by
% Shen, Tan, and Tham (see [STT]); r=2, l=4, m=4, A=1, S=0.9920
%
%%%%%%%以下是双正交多重小波%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'bih52s' most smooth biorthogonal symmetric multi-filter bank,
% dual to Hermite cubic filter bank 'bih32s' (see [TS]);
% r=2, l=5, m=3, A=2, S=0.8280
% 'bih32s' Hermite cubic multi-filter bank biorthogonal to 'bih52s'
% (see [TS]); r=2, l=3, m=5, A=4, S=2.4999
%
%
% 'bih54n' non L2 biorthogonal symmetric multi-filter bank,
% dual to Hermite cubic filter bank 'bih34n' (see [S]);
% r=2, l=5, m=3, A=4, S=-0.6050
% 'bih34n' Hermite cubic multi-filter bank biorthogonal to 'bih54n'
% (see [S]); r=2, l=3, m=5, A=4, S=2.4999
%
%
% 'bighm2' biorthogonal multi-filter bank obtained from 'ghm' filter bank
% by factoring out one approximation order, dual to 'bighm6'
% (see [S]); r=2, l=2, m=6, A=1, S=0.4999 %% This is for reconstruction
% 'bighm6' biorthogonal multi-filter bank obtained from 'ghm' filter bank
% by adding one approximation order, dual to 'bighm2' (see [S]);
% r=2, l=6, m=2, A=3, S=2.4999 This is for decomosition
%
%%%%%%以下是几个平衡多小波%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'cardbal2' orthogonal cardinal 2-balanced multi-filter bank constructed
% by I. Selesnick (see [Se]); r=2, l=6, m=6, A=2, S=1.5261
% 'cardbal3' orthogonal cardinal 3-balanced multi-filter bank constructed
% by I. Selesnick (see [Se]); r=2, l=8, m=8, A=3, S=1.3345
% 'cardbal4' orthogonal cardinal 4-balanced multi-filter bank constructed
% by I. Selesnick (see [Se]); r=2, l=12, m=12, A=4, S=1.7979
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% 以下是几个平衡多重小波: %%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 'clbal' this is balnance of Chui-Lian orthogonal symmetric multi-filter bank;
%
% 'ghmbal' this is balance of GHM multiwavelet
%
%
%
% Example of Usage:
% [L,H]=coef('bih52s')
% Author: Vasily Strela
% COPYRIGHT 1997,98 by Vasily Strela
if strcmp(flt,'haar')
L=[1 1]/sqrt(2);
H=[1 -1]/sqrt(2);
elseif strcmp(flt,'d4')
L=[(1+sqrt(3))/(4*sqrt(2)) (3+sqrt(3))/(4*sqrt(2)) (3-sqrt(3))/(4*sqrt(2)) (1-sqrt(3))/(4*sqrt(2))];
H=[(1-sqrt(3))/(4*sqrt(2)) (-3+sqrt(3))/(4*sqrt(2)) (3+sqrt(3))/(4*sqrt(2)) (-1-sqrt(3))/(4*sqrt(2))];
elseif strcmp(flt,'la8')
L=[-0.07576571478950 -0.02963552764600 0.49761866763278 0.80373875180513 0.29785779560530 -0.09921954357663 -0.01260396726203 0.03222310060405];
H=[-0.03222310060405 -0.01260396726203 0.09921954357663 0.29785779560530 -0.80373875180513 0.49761866763278 0.02963552764600 -0.07576571478950];
elseif strcmp(flt,'bi9')
L=[0.03782845550700 -0.02384946501938 -0.11062440441842 0.37740285561265 0.85269867900940 0.37740285561265 -0.11062440441842 -0.02384946501938 0.03782845550700];
H=[0 0 0.06453888262894 -0.04068941760956 -0.41809227322221 0.78848561640566 -0.41809227322221 -0.04068941760956 0.06453888262894];
elseif strcmp(flt,'bi7')
L=[0 -0.06453888262894 -0.04068941760956 0.41809227322221 0.78848561640566 0.41809227322221 -0.04068941760956 -0.06453888262894];
H=[0 0.03782845550700 0.02384946501938 -0.11062440441842 -0.37740285561265 0.85269867900940 -0.37740285561265 -0.11062440441842 0.02384946501938 0.03782845550700];
elseif strcmp(flt,'bi5')
L=[-1/4 2/4 6/4 2/4 -1/4]/sqrt(2);
H=[0 0 -1/4 2/4 -1/4]/sqrt(2);
elseif strcmp(flt,'bi3')
L=[0 1/4 2/4 1/4]*sqrt(2);
H=[0 -1/4 -2/4 6/4 -2/4 -1/4]*sqrt(2);
elseif strcmp(flt,'ghm')
L=[ 3/(5*sqrt(2)) 4/5 3/(5*sqrt(2)) 0 0 0 0 0
-1/20 -3/(10*sqrt(2)) 9/20 1/sqrt(2) 9/20 -3/(10*sqrt(2)) -1/20 0];
H=[-1/20 -3/(10*sqrt(2)) 9/20 -1/sqrt(2) 9/20 -3/(10*sqrt(2)) -1/20 0
1/(10*sqrt(2)) 3/10 -9/(10*sqrt(2)) 0 9/(10*sqrt(2)) -3/10 -1/(10*sqrt(2)) 0];
elseif strcmp(flt,'cl')
L=[1/(2*sqrt(2)) -1/(2*sqrt(2)) 1/sqrt(2) 0 1/(2*sqrt(2)) 1/(2*sqrt(2))
sqrt(7)/(4*sqrt(2)) -sqrt(7)/(4*sqrt(2)) 0 1/(2*sqrt(2)) -sqrt(7)/(4*sqrt(2)) -sqrt(7)/(4*sqrt(2))];
H=[1/(2*sqrt(2)) -1/(2*sqrt(2)) -1/sqrt(2) 0 1/(2*sqrt(2)) 1/(2*sqrt(2))
-1/(4*sqrt(2)) 1/(4*sqrt(2)) 0 sqrt(7)/(2*sqrt(2)) 1/(4*sqrt(2)) 1/(4*sqrt(2))];
elseif strcmp(flt,'bih52s')
L=[-73/648 -77/972 1/2 89/486 397/324 0 1/2 -89/486 -73/648 77/972
773/1080 3229/6480 -187/60 -91/81 0 6091/3240 187/60 -91/81 -773/1080 3229/6480]/sqrt(2);
H=[0 0 0 0 -1/4 -1/8 1/2 0 -1/4 1/8
0 0 0 0 3/8 1/8 0 1/2 -3/8 1/8]/sqrt(2);
elseif strcmp(flt,'bih32s')
L=[0 0 1/2 3/4 1 0 1/2 -3/4
0 0 -1/8 -1/8 0 1/2 1/8 -1/8]/sqrt(2);
H=[0 0 67/240 7/240 -1 -187/60 173/120 0 -1 187/60 67/240 -7/240
0 0 -95/972 -1/162 89/243 91/81 0 26/9 -89/243 91/81 95/972 -1/162]/sqrt(2);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -