⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atrousfilters.m

📁 This toolbox contains Matlab files that implement the nonsubsample contourlet transform and its util
💻 M
📖 第 1 页 / 共 2 页
字号:
function [h0,h1,g0,g1] = atrousfilters(fname);
% ATROUSFILTERS	Generate pyramid 2D filters
%
%	[h0, h1, g0, g1] = atrousfilters(fname, type)
%
%   Input:
%	fname:	Filter name.  Available 'fname' are:
%		'9-7':		    Filters obtained from 9-7 1-D prototypes
%		'maxflat':		Filters derived from 1-D using maximally flat mapping function with 4 vanishing moments
%		'pyr':		    Filters derived from 1-D using maximally flat mapping function with 2 vanishing moments
%		'pyrexc':		Same as pyr but exchanging two highpass filters

%   Output:
%	h0, h1, g0, g1:	pyramid filters for 2-D nonsubsampled filter bank (lowpass and highpass)

%   To test those filters (for the PR condition for the FIR case), verify that:
%   conv2(h0,g0) + conv2(g1, h1) = 1
%   (replace + with - for even size filters)
 
%   the filters have horizontal/vertical/diagonal symetry and can be implemented with
%   symetric extension. 
%   filters designed by A. Cunha, May 2004 (see Tech Report, University of Illinois, Set 2004, av. upon req.)
%   SEE ALSO: dfilters, nsscdec


switch fname
case '9-7'
    % Filters derived from 9-7 prototypes, frame bounds A=0.91, B=1.101
h0 = [0.00010448733363597687 0.000835898669087815   0.0029256453418073525  0.005851290683614705    0.007314113354518382 ...
      0.005851290683614705   0.0029256453418073525  0.000835898669087815   0.00010448733363597687;    
      0.000835898669087815   0.003080092825681339   0.001762583572331734  -0.007296122436400075 ...
     -0.013629023704276572  -0.007296122436400075   0.001762583572331734   0.003080092825681339    0.000835898669087815 ;
      0.0029256453418073525  0.001762583572331734  -0.01306636838062783   -0.02131840020457929    -0.018830187186854155 ...
     -0.02131840020457929   -0.01306636838062783    0.001762583572331734   0.0029256453418073525;
      0.005851290683614705  -0.007296122436400075  -0.02131840020457929    0.0740121520471188      0.16436627826336664 ...
      0.0740121520471188    -0.02131840020457929   -0.007296122436400075   0.005851290683614705;
      0.007314113354518382  -0.013629023704276572  -0.018830187186854155   0.16436627826336664     0.3245066567828517  0.16436627826336664 ...
     -0.018830187186854155  -0.013629023704276572   0.007314113354518382;  
      0.005851290683614705  -0.007296122436400075  -0.02131840020457929    0.0740121520471188      0.16436627826336664 ...
      0.0740121520471188    -0.02131840020457929   -0.007296122436400075   0.005851290683614705;
      0.0029256453418073525  0.001762583572331734  -0.01306636838062783   -0.02131840020457929    -0.018830187186854155 ...
     -0.02131840020457929   -0.01306636838062783    0.001762583572331734   0.0029256453418073525;    
      0.000835898669087815   0.003080092825681339   0.001762583572331734 ...
     -0.007296122436400075  -0.013629023704276572  -0.007296122436400075 0.001762583572331734      0.003080092825681339 0.000835898669087815; 
      0.00010448733363597687 0.000835898669087815   0.0029256453418073525 ...
      0.005851290683614705   0.007314113354518382   0.005851290683614705 0.0029256453418073525     0.000835898669087815 0.00010448733363597687];
    
h1= [0.0014261212986601578    0.008556727791960947    0.021391819479902367    0.028522425973203154 ...
     0.021391819479902367     0.008556727791960947    0.0014261212986601578;  
     0.008556727791960947     0.01351698519464063    -0.022942609349085995  ...    
    -0.055805733503531366    -0.022942609349085995    0.01351698519464063     0.008556727791960947; 
     0.021391819479902367    -0.022942609349085995   -0.1692097602584649     -0.24975066285895303    -0.1692097602584649 ...
    -0.022942609349085995     0.021391819479902367; 
     0.028522425973203154    -0.055805733503531366   -0.24975066285895303     1.669154993235563      -0.24975066285895303      ...
    -0.055805733503531366     0.028522425973203154; 
     0.021391819479902367    -0.022942609349085995   -0.1692097602584649     -0.24975066285895303  ...    
    -0.1692097602584649      -0.022942609349085995    0.021391819479902367  ; 
     0.008556727791960947     0.01351698519464063    -0.022942609349085995   -0.055805733503531366   ...
    -0.022942609349085995     0.01351698519464063     0.008556727791960947  ; 
     0.0014261212986601578    0.008556727791960947    0.021391819479902367    0.028522425973203154 ...   
     0.021391819479902367     0.008556727791960947    0.0014261212986601578 ];
 
 
 g0= [-0.0014261212986601578      -0.008556727791960947    -0.021391819479902367      -0.028522425973203154 ...     
      -0.021391819479902367       -0.008556727791960947    -0.0014261212986601578;
      -0.008556727791960947       -0.020709925973203154    -0.005829153765164099       0.012648088832156207...
      -0.005829153765164099       -0.020709925973203154    -0.008556727791960947; 
      -0.021391819479902367       -0.005829153765164099     0.1692097602584649         0.3072941890874532 ...    
       0.1692097602584649         -0.005829153765164099    -0.021391819479902367; 
      -0.028522425973203154        0.012648088832156207     0.3072941890874532         0.5322473485641878 ...    
       0.3072941890874532          0.012648088832156207    -0.028522425973203154 ; 
      -0.021391819479902367       -0.005829153765164099     0.1692097602584649         0.3072941890874532 ...   
       0.1692097602584649         -0.005829153765164099    -0.021391819479902367 ;
      -0.008556727791960947       -0.020709925973203154    -0.005829153765164099       0.012648088832156207 ...
      -0.005829153765164099       -0.020709925973203154    -0.008556727791960947;
      -0.0014261212986601578      -0.008556727791960947    -0.021391819479902367      -0.028522425973203154...      
      -0.021391819479902367       -0.008556727791960947    -0.0014261212986601578];

g1= [   0.00010448733363597687   0.000835898669087815      0.0029256453418073525     0.005851290683614705      0.007314113354518382...
        0.005851290683614705     0.0029256453418073525     0.000835898669087815      0.00010448733363597687; 
        0.000835898669087815     0.0036070965270211808     0.004924605780370786      0.0006089330836975557    -0.0030889496774797283...     
        0.0006089330836975557    0.004924605780370786      0.0036070965270211808     0.000835898669087815; 
        0.0029256453418073525    0.004924605780370786     -0.006742323964549725     -0.024480422412618347     -0.03147827601901037...      
       -0.024480422412618347    -0.006742323964549725      0.004924605780370786      0.0029256453418073525;
        0.005851290683614705     0.0006089330836975557    -0.024480422412618347     -0.06732496269441629      -0.09617379576343019  ...   
       -0.06732496269441629     -0.024480422412618347      0.0006089330836975557     0.005851290683614705 ; 
        0.007314113354518382    -0.0030889496774797283    -0.03147827601901037      -0.09617379576343019       0.849802834447164 ...
       -0.09617379576343019     -0.03147827601901037      -0.0030889496774797283     0.007314113354518382; 
        0.005851290683614705     0.0006089330836975557    -0.024480422412618347     -0.06732496269441629      -0.09617379576343019...
       -0.06732496269441629     -0.024480422412618347      0.0006089330836975557     0.005851290683614705  ; 
        0.0029256453418073525    0.004924605780370786     -0.006742323964549725     -0.024480422412618347     -0.03147827601901037 ...
       -0.024480422412618347    -0.006742323964549725      0.004924605780370786      0.0029256453418073525;
        0.000835898669087815     0.0036070965270211808     0.004924605780370786      0.0006089330836975557    -0.0030889496774797283 ...    
        0.0006089330836975557    0.004924605780370786      0.0036070965270211808     0.000835898669087815;
        0.00010448733363597687   0.000835898669087815      0.0029256453418073525     0.005851290683614705      0.007314113354518382...
        0.005851290683614705     0.0029256453418073525     0.000835898669087815      0.00010448733363597687 ];
        
 % normalize filters
 
 h0 = h0 ;
 h1 = h1./2 ;
      
 g0 = g0./2;
 g1 = g1;
        
case 'maxflat'        
 % Quasi-tight frame filters, frame bounds A=.97 and B=1
 
h0=[-7.900496718847182e-07 0. 0.000014220894093924927 0.000025281589500310983 -0.000049773129328737247 -0.00022753430550279883 -0.00033182086219158167; 
           0               0              0                   0                       0                          0                     0;
   0.000014220894093924927 0. -0.0002559760936906487 -0.00045506861100559767   0.0008959163279172705   0.004095617499050379    0.00597277551944847;
   0.000025281589500310983 0. -0.00045506861100559767 0.0009765625             0.0015927401385195919  -0.0087890625           -0.01795090623402861;
  -0.000049773129328737247 0.  0.0008959163279172705  0.0015927401385195919   -0.0031357071477104465  -0.014334661246676327   -0.020904714318069645;
  -0.00022753430550279883  0.  0.004095617499050379  -0.0087890625            -0.014334661246676327    0.0791015625            0.16155815610625748;
  -0.00033182086219158167  0.  0.00597277551944847   -0.01795090623402861     -0.020904714318069645    0.16155815610625748     0.3177420190660832];

g0=[-6.391587676622346e-010             0.                1.7257286726880333e-08    3.067962084778726e-08   -1.3805829381504267e-07  -5.522331752601707e-07 ...
    -3.3747582932565985e-07    1.9328161134105974e-06     5.6949046198705095e-06    7.649452131381623e-06;
            0.                          0.                      0.                          0.               0.  0.  0.  0.  0.  0. ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -