📄 gfresp2.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 gfresp2</title> <meta name="keywords" content="gfresp2"> <meta name="description" content="GFRESP2 2-D filter response using spatial domain filters."> <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> > gfresp2.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>gfresp2</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>GFRESP2 2-D filter response using spatial domain filters.</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 [r]=gfresp2(gf_, s_, 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">GFRESP2 2-D filter response using spatial domain filters. [R] = GFRESP2(GF,S) calculates the response R of Gabor filter GF for the 2-D signal S. GF should be given in spatial space (use GFCREATEFILTER2) and S in spatial space (gray level image, etc.) If GF is normalized Gabor filter (GFCREATEFILTER2) then the response can be considered as normalized response. [R] = GFRESPF2(GF,S,X0,Y0) returns the response at location (Y,X) --------> x | | | V y Examples See also <a href="gfcreatefilter2.html" class="code" title="function [g]=gfcreatefilter2(f0,theta,gamma,eta,n,varargin)">GFCREATEFILTER2</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.1 $ $Date: 2003-12-23 07:27:55 $</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)"></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"></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">%GFRESP2 2-D filter response using spatial domain filters.</span>0002 <span class="comment">%</span>0003 <span class="comment">% [R] = GFRESP2(GF,S) calculates the response R of</span>0004 <span class="comment">% Gabor filter GF for the 2-D signal S. GF should be given in</span>0005 <span class="comment">% spatial space (use GFCREATEFILTER2) and S in spatial space</span>0006 <span class="comment">% (gray level image, etc.) If GF is normalized Gabor filter</span>0007 <span class="comment">% (GFCREATEFILTER2) then the response can be considered as</span>0008 <span class="comment">% normalized response.</span>0009 <span class="comment">%</span>0010 <span class="comment">% [R] = GFRESPF2(GF,S,X0,Y0) returns the response at location</span>0011 <span class="comment">% (Y,X)</span>0012 <span class="comment">%</span>0013 <span class="comment">% --------> x</span>0014 <span class="comment">% |</span>0015 <span class="comment">% |</span>0016 <span class="comment">% |</span>0017 <span class="comment">% V y</span>0018 <span class="comment">%</span>0019 <span class="comment">% Examples</span>0020 <span class="comment">%</span>0021 <span class="comment">% See also GFCREATEFILTER2.</span>0022 <span class="comment">%</span>0023 <span class="comment">% References:</span>0024 <span class="comment">% [1] Kamarainen, J.-K., Kyrki, V., Kalviainen, H., Gabor</span>0025 <span class="comment">% Features for Invariant Object Recognition, Research</span>0026 <span class="comment">% report 79, Department of Information Technology,</span>0027 <span class="comment">% Lappeenranta University of Technology</span>0028 <span class="comment">%</span>0029 <span class="comment">% Author(s):</span>0030 <span class="comment">% Joni Kamarainen <Joni.Kamarainen@lut.fi></span>0031 <span class="comment">% Ville Kyrki <Ville.Kyrki@lut.fi></span>0032 <span class="comment">%</span>0033 <span class="comment">% Copyright:</span>0034 <span class="comment">%</span>0035 <span class="comment">% The Gabor Features in Signal and Image Processing Toolbox is</span>0036 <span class="comment">% Copyright (C) 2000 by Joni Kamarainen and Ville Kyrki.</span>0037 <span class="comment">%</span>0038 <span class="comment">%</span>0039 <span class="comment">% $Name: $ $Revision: 1.1 $ $Date: 2003-12-23 07:27:55 $</span>0040 <span class="comment">%</span>0041 <a name="_sub0" href="#_subfunctions" class="code">function [r]=gfresp2(gf_, s_, varargin);</a>0042 0043 <span class="comment">% calculate only at several locations</span>0044 <span class="keyword">if</span> (nargin > 2)0045 x0 = diag(diag(varargin{1}));0046 y0 = diag(diag(varargin{2}));0047 subimg = zeros(size(s_));0048 0049 <span class="keyword">for</span> coordInd = 1:length(x0)0050 0051 rn = [rn; r(y0(coordInd), x0(coordInd))];0052 <span class="keyword">end</span>;0053 <span class="keyword">end</span>;0054 0055 0056 <span class="comment">% spatial centered signal -> uncentered frequency spectra</span>0057 ffts = fft2(ifftshift(s_));0058 0059 <span class="comment">% response matrix</span>0060 r = fftshift(ifft2(ffts.*gf_));0061 0062 <span class="comment">% only at some given coordinates</span>0063 <span class="keyword">if</span> (nargin > 2) <span class="comment">% coordinates given</span>0064 x0 = diag(diag(varargin{1}));0065 y0 = diag(diag(varargin{2}));0066 rn = [];0067 <span class="keyword">for</span> coordInd = 1:length(x0)0068 rn = [rn; r(y0(coordInd), x0(coordInd))];0069 <span class="keyword">end</span>;0070 r = rn;0071 <span class="keyword">end</span>;</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 + -