📄 gfcreatefilterf.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head> <title>Description of gfcreatefilterf</title> <meta name="keywords" content="gfcreatefilterf"> <meta name="description" content="GFCREATEFILTERF Create normalized 1-D Gabor filter in the frequency domain."> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="generator" content="m2html © 2003 Guillaume Flandin"> <meta name="robots" content="index, follow"> <link type="text/css" rel="stylesheet" href="../m2html.css"></head><body><a name="_top"></a><div><a href="../index.html">Home</a> > <a href="index.html">gabortb-v0.4.1</a> > gfcreatefilterf.m</div><!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td><td align="right"><a href="index.html">Index for gabortb-v0.4.1 <img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>gfcreatefilterf</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>GFCREATEFILTERF Create normalized 1-D Gabor filter in the frequency domain.</strong></div><h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>function [g]=gfcreatefilterf(f0,gamma,N,varargin) </strong></div><h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="fragment"><pre class="comment">GFCREATEFILTERF Create normalized 1-D Gabor filter in the frequency domain. [G] = GFCREATEFILTERF(F0,GAMMA,N,...) creates a normalized Gabor filter G of size N with central frequency F0, normalized width GAMMA. G = GFCREATEFILTER(...,'PF',PF) determines that at least P percent of the Gaussian envelope of the filter must be included in the filter in frequency domain. For default, PF=0.998. G = GFCREATEFILTER(...,'PT',PT) determines that at least P percent of the Gaussian envelope of the filter must be included in the filter in time domain. For default, PT=0.998. Examples See also <a href="gfcreatefilter.html" class="code" title="function [g]=gfcreatefilter(f0,gamma,n,varargin)">GFCREATEFILTER</a>, <a href="gfcheckfilter.html" class="code" title="function []=gfcheckfilter(f0,gamma,N,PT,PF)">GFCHECKFILTER</a>. References: [1] Kamarainen, J.-K., Kyrki, V., Kalviainen, H., Gabor Features for Invariant Object Recognition, Research report 79, Department of Information Technology, Lappeenranta University of Technology Author(s): Joni Kamarainen <Joni.Kamarainen@lut.fi> Ville Kyrki <Ville.Kyrki@lut.fi> Copyright: The Gabor Features in Signal and Image Processing Toolbox is Copyright (C) 2000 by Joni Kamarainen and Ville Kyrki. $Name: $ $Revision: 1.10 $ $Date: 2003-02-23 16:27:44 $</pre></div><!-- crossreference --><h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2>This function calls:<ul style="list-style-image:url(../matlabicon.gif)"><li><a href="gfcheckfilter.html" class="code" title="function []=gfcheckfilter(f0,gamma,N,PT,PF)">gfcheckfilter</a> GFCHECKFILTER Check filter parameters.</li></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"><li><a href="gfdemo01.html" class="code" title="function [] = gfdemo01;">gfdemo01</a> 1DDEMO01 Demonstrate 1-D Gabor functionality</li><li><a href="gfplotfiltersf.html" class="code" title="function []=gfplotfiltersf(f0,gamma,N)">gfplotfiltersf</a> GFPLOTFILTERSF Plot 1-D normalized Gabor filters in the frequency domain.</li></ul><!-- crossreference --><h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="fragment"><pre>0001 <span class="comment">%GFCREATEFILTERF Create normalized 1-D Gabor filter in the frequency domain.</span>0002 <span class="comment">%</span>0003 <span class="comment">% [G] = GFCREATEFILTERF(F0,GAMMA,N,...) creates a normalized Gabor</span>0004 <span class="comment">% filter G of size N with central frequency F0, normalized width GAMMA.</span>0005 <span class="comment">%</span>0006 <span class="comment">% G = GFCREATEFILTER(...,'PF',PF) determines that at least</span>0007 <span class="comment">% P percent of the Gaussian envelope of the filter must be</span>0008 <span class="comment">% included in the filter in frequency domain. For default,</span>0009 <span class="comment">% PF=0.998.</span>0010 <span class="comment">%</span>0011 <span class="comment">% G = GFCREATEFILTER(...,'PT',PT) determines that at least</span>0012 <span class="comment">% P percent of the Gaussian envelope of the filter must be</span>0013 <span class="comment">% included in the filter in time domain. For default,</span>0014 <span class="comment">% PT=0.998.</span>0015 <span class="comment">%</span>0016 <span class="comment">% Examples</span>0017 <span class="comment">%</span>0018 <span class="comment">% See also GFCREATEFILTER, GFCHECKFILTER.</span>0019 <span class="comment">%</span>0020 <span class="comment">% References:</span>0021 <span class="comment">% [1] Kamarainen, J.-K., Kyrki, V., Kalviainen, H., Gabor</span>0022 <span class="comment">% Features for Invariant Object Recognition, Research</span>0023 <span class="comment">% report 79, Department of Information Technology,</span>0024 <span class="comment">% Lappeenranta University of Technology</span>0025 <span class="comment">%</span>0026 <span class="comment">% Author(s):</span>0027 <span class="comment">% Joni Kamarainen <Joni.Kamarainen@lut.fi></span>0028 <span class="comment">% Ville Kyrki <Ville.Kyrki@lut.fi></span>0029 <span class="comment">%</span>0030 <span class="comment">% Copyright:</span>0031 <span class="comment">%</span>0032 <span class="comment">% The Gabor Features in Signal and Image Processing Toolbox is</span>0033 <span class="comment">% Copyright (C) 2000 by Joni Kamarainen and Ville Kyrki.</span>0034 <span class="comment">%</span>0035 <span class="comment">%</span>0036 <span class="comment">% $Name: $ $Revision: 1.10 $ $Date: 2003-02-23 16:27:44 $</span>0037 <span class="comment">%</span>0038 <a name="_sub0" href="#_subfunctions" class="code">function [g]=gfcreatefilterf(f0,gamma,N,varargin)</a>0039 0040 <span class="comment">%</span>0041 <span class="comment">% Setting default values</span>0042 alpha = f0/gamma;0043 PT = 0.998;0044 PF = 0.998;0045 0046 <span class="comment">%</span>0047 <span class="comment">% Parameter parsing</span>0048 currentarg = 1;0049 <span class="keyword">while</span> (length(varargin) > currentarg)0050 [param,value]=deal(varargin{currentarg:currentarg+1});0051 <span class="keyword">switch</span> lower(param)0052 <span class="keyword">case</span> <span class="string">'pt'</span>0053 PT = value;0054 <span class="keyword">case</span> <span class="string">'pf'</span>0055 PF = value;0056 <span class="keyword">otherwise</span>0057 error([<span class="string">'Unknown parameter '''</span> param <span class="string">'''.'</span>]);0058 <span class="keyword">end</span>;0059 currentarg=currentarg+2;0060 <span class="keyword">end</span>;0061 0062 <span class="comment">% Check filter constraints</span>0063 <a href="gfcheckfilter.html" class="code" title="function []=gfcheckfilter(f0,gamma,N,PT,PF)">gfcheckfilter</a>(f0,gamma,N,PT,PF);0064 0065 <span class="comment">% Creating the bank</span>0066 n = -N:1:N;0067 nyqf = 0.5; <span class="comment">% Nyquist frequency</span>0068 u = n/N; <span class="comment">% frequencies that bank contains</span>0069 0070 <span class="comment">% Create filter values</span>0071 g = zeros(1,N);0072 gf = exp(-(pi^2/alpha^2)*(u-f0).^2); 0073 g = gf((N+1):(2*N)); <span class="comment">% frequencies from 0 to (N-1)/N</span>0074 g = g+gf(1:N); <span class="comment">% aliased frequencies</span>0075 0076 0077</pre></div><hr><address>Generated on Fri 23-Nov-2007 14:52:42 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -