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

📄 gfcreatefilter.html

📁 外国人写matlab 的gobor特征运算工具箱
💻 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 gfcreatefilter</title>  <meta name="keywords" content="gfcreatefilter">  <meta name="description" content="GFCREATEFILTER Create normalized 1-D Gabor filter in time domain.">  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">  <meta name="generator" content="m2html &copy; 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> &gt;  <a href="index.html">gabortb-v0.4.1</a> &gt; gfcreatefilter.m</div><!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td><td align="right"><a href="index.html">Index for gabortb-v0.4.1&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>gfcreatefilter</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>GFCREATEFILTER Create normalized 1-D Gabor filter in time 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]=gfcreatefilter(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"> GFCREATEFILTER Create normalized 1-D Gabor filter in time domain.     G = GFCREATEFILTER(F0,GAMMA,N,...) creates a normalized Gabor     filter G with frequency F0, normalized width GAMMA, and     length N.      G = GFCREATEFILTER(...,'pt',PT) determines that at least     PT percent of the Gaussian envelope of the filter must be     included in the filter in spatial domain. For default,      P=0.998.     G = GFCREATEFILTER(...,'pf',PF) determines that at least     PF percent of the Gaussian envelope of the filter must be     included in the filter in frequency domain. For default,     PF=0.998.  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 &lt;Joni.Kamarainen@lut.fi&gt;    Ville Kyrki &lt;Ville.Kyrki@lut.fi&gt; Copyright:   The Gabor Features in Signal and Image Processing Toolbox is   Copyright (C) 2000 by Joni Kamarainen and Ville Kyrki.   $Name:  $ $Revision: 1.7 $  $Date: 2003-03-03 10:51:17 $</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></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 <a name="_sub0" href="#_subfunctions" class="code">function [g]=gfcreatefilter(f0,gamma,n,varargin)</a>0002 <span class="comment">% GFCREATEFILTER Create normalized 1-D Gabor filter in time domain.</span>0003 <span class="comment">%</span>0004 <span class="comment">%     G = GFCREATEFILTER(F0,GAMMA,N,...) creates a normalized Gabor</span>0005 <span class="comment">%     filter G with frequency F0, normalized width GAMMA, and</span>0006 <span class="comment">%     length N.</span>0007 <span class="comment">%</span>0008 <span class="comment">%     G = GFCREATEFILTER(...,'pt',PT) determines that at least</span>0009 <span class="comment">%     PT percent of the Gaussian envelope of the filter must be</span>0010 <span class="comment">%     included in the filter in spatial domain. For default,</span>0011 <span class="comment">%     P=0.998.</span>0012 <span class="comment">%</span>0013 <span class="comment">%     G = GFCREATEFILTER(...,'pf',PF) determines that at least</span>0014 <span class="comment">%     PF percent of the Gaussian envelope of the filter must be</span>0015 <span class="comment">%     included in the filter in frequency domain. For default,</span>0016 <span class="comment">%     PF=0.998.</span>0017 <span class="comment">%</span>0018 <span class="comment">% References:</span>0019 <span class="comment">%   [1] Kamarainen, J.-K., Kyrki, V., Kalviainen, H., Gabor</span>0020 <span class="comment">%       Features for Invariant Object Recognition, Research</span>0021 <span class="comment">%       report 79, Department of Information Technology,</span>0022 <span class="comment">%       Lappeenranta University of Technology</span>0023 <span class="comment">%</span>0024 <span class="comment">% Author(s):</span>0025 <span class="comment">%    Joni Kamarainen &lt;Joni.Kamarainen@lut.fi&gt;</span>0026 <span class="comment">%    Ville Kyrki &lt;Ville.Kyrki@lut.fi&gt;</span>0027 <span class="comment">%</span>0028 <span class="comment">% Copyright:</span>0029 <span class="comment">%</span>0030 <span class="comment">%   The Gabor Features in Signal and Image Processing Toolbox is</span>0031 <span class="comment">%   Copyright (C) 2000 by Joni Kamarainen and Ville Kyrki.</span>0032 <span class="comment">%</span>0033 <span class="comment">%   $Name:  $ $Revision: 1.7 $  $Date: 2003-03-03 10:51:17 $</span>0034 <span class="comment">%</span>0035 0036 pt=0.998; <span class="comment">% corresponds approximately to (1-1/512)</span>0037 pf=0.998;0038 0039 <span class="keyword">if</span> mod(length(varargin),2)&gt;0,0040   error(<span class="string">'Each parameter must be given a value.'</span>);0041 <span class="keyword">end</span>;0042 0043 currentarg=1;0044 <span class="keyword">while</span> length(varargin)&gt;currentarg,0045 0046   [param,value]=deal(varargin{currentarg:currentarg+1});0047 0048   <span class="keyword">switch</span> lower(param)0049    <span class="keyword">case</span> <span class="string">'pt'</span>0050     pt=value;0051    <span class="keyword">case</span> <span class="string">'pf'</span>0052     pf=value;0053    <span class="keyword">otherwise</span>0054     error([<span class="string">'Unknown parameter '''</span> param <span class="string">'''.'</span>]);0055   <span class="keyword">end</span>;0056   0057   currentarg=currentarg+2;0058 <span class="keyword">end</span>;0059 0060 <a href="gfcheckfilter.html" class="code" title="function []=gfcheckfilter(f0,gamma,N,PT,PF)">gfcheckfilter</a>(f0,gamma,n,pt,pf);0061 0062 alpha=f0/gamma;0063 0064 <span class="comment">% Parittomalla pituudella indeksit -(n-1)/2:(n-1)/2</span>0065 <span class="comment">% Parillisella -(n/2):(n/2-1)</span>0066 <span class="comment">% Esim. 9 -&gt; -4:4, 8 -&gt; -4:3</span>0067 <span class="comment">% Filttering nollakohdan indeksi siis parillisella n/2+1</span>0068 <span class="comment">% parittomalla (n+1)/2</span>0069 <span class="keyword">if</span> mod(n,2)&gt;0,0070   t=-((n-1)/2):(n-1)/2;0071 <span class="keyword">else</span>0072   t=-(n/2):(n/2-1);0073 <span class="keyword">end</span>;0074 0075 g=abs(alpha)/sqrt(pi)*exp(-alpha^2*t.^2+j*2*pi*f0*t);0076 0077 0078</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> &copy; 2003</address></body></html>

⌨️ 快捷键说明

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