centersurround.html
来自「显著区域检测。求的图像中感兴趣区域的位置」· HTML 代码 · 共 114 行
HTML
114 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head> <title>Description of centerSurround</title> <meta name="keywords" content="centerSurround"> <meta name="description" content="centerSurround - computes center-surround difference maps."> <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="#">mfiles</a> > centerSurround.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 .\mfiles <img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>centerSurround</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>centerSurround - computes center-surround difference maps.</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 [featureMaps,csLevels] = centerSurround(pyr,params) </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"> centerSurround - computes center-surround difference maps. [featureMaps,csLevels] = centerSurround(pyramid,salParams) computes the center-surround maps in the pyramid according to the parameters in salParams. featureMaps is a vector of maps with the results. csLevels returns the center and surround levels in pyramid for later reference. See also <a href="defaultSaliencyParams.html" class="code" title="function params = defaultSaliencyParams(varargin)">defaultSaliencyParams</a>, <a href="defaultLevelParams.html" class="code" title="function levelParams = defaultLevelParams(pyramidType)">defaultLevelParams</a>, <a href="makeSaliencyMap.html" class="code" title="function [salmap, saliencyData] = makeSaliencyMap(img, salParams, varargin)">makeSaliencyMap</a>, <a href="centerSurroundTopDown.html" class="code" title="function [featureMaps,csLevels] = centerSurroundTopDown(pyr,salParams)">centerSurroundTopDown</a>, <a href="dataStructures.html" class="code" title="">dataStructures</a>.</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="attenuateBorders.html" class="code" title="function result = attenuateBorders(data,borderSize)">attenuateBorders</a> attentuateBorders - linearly attentuates the border of data.</li><li><a href="debugMsg.html" class="code" title="function debugMsg(message,varargin)">debugMsg</a> debugMsg displays a debug message with line number and filename.</li><li><a href="timeString.html" class="code" title="function s = timeString()">timeString</a> timeString returns the current time and date in a convenient string format.</li></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"><li><a href="makeSaliencyMap.html" class="code" title="function [salmap, saliencyData] = makeSaliencyMap(img, salParams, varargin)">makeSaliencyMap</a> makeSaliencyMap - creates a saliency map for an image.</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">% centerSurround - computes center-surround difference maps.</span>0002 <span class="comment">%</span>0003 <span class="comment">% [featureMaps,csLevels] = centerSurround(pyramid,salParams)</span>0004 <span class="comment">% computes the center-surround maps in the pyramid</span>0005 <span class="comment">% according to the parameters in salParams.</span>0006 <span class="comment">%</span>0007 <span class="comment">% featureMaps is a vector of maps with the results.</span>0008 <span class="comment">% csLevels returns the center and surround levels in</span>0009 <span class="comment">% pyramid for later reference.</span>0010 <span class="comment">%</span>0011 <span class="comment">% See also defaultSaliencyParams, defaultLevelParams, makeSaliencyMap,</span>0012 <span class="comment">% centerSurroundTopDown, dataStructures.</span>0013 0014 <span class="comment">% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007</span>0015 <span class="comment">% by Dirk B. Walther and the California Institute of Technology.</span>0016 <span class="comment">% See the enclosed LICENSE.TXT document for the license agreement.</span>0017 <span class="comment">% More information about this project is available at:</span>0018 <span class="comment">% http://www.saliencytoolbox.net</span>0019 0020 <a name="_sub0" href="#_subfunctions" class="code">function [featureMaps,csLevels] = centerSurround(pyr,params)</a>0021 0022 <a href="debugMsg.html" class="code" title="function debugMsg(message,varargin)">debugMsg</a>(<span class="string">''</span>,pyr);0023 0024 <span class="comment">% resize everything that needs to be resized</span>0025 lp = params.levelParams;0026 siz = size(pyr.levels(lp.mapLevel).data);0027 numLevels = length(pyr.levels);0028 c = 1;0029 <span class="keyword">for</span> l = lp.minLevel:(lp.maxLevel + lp.maxDelta)0030 <span class="keyword">if</span> (l > numLevels) <span class="keyword">break</span>; <span class="keyword">end</span>0031 maps(c).origImage = pyr.levels(l).origImage;0032 maps(c).label = pyr.levels(l).label;0033 maps(c).data = imresize(pyr.levels(l).data,siz,<span class="string">'nearest'</span>);0034 maps(c).date = <a href="timeString.html" class="code" title="function s = timeString()">timeString</a>;0035 idx(l) = c;0036 c = c + 1;0037 <span class="keyword">end</span>0038 0039 <span class="comment">% compute all the c-s differences</span>0040 cc = 1;0041 borderSize = round(max(siz)/20);0042 lab = pyr.label;0043 <span class="keyword">for</span> l = lp.minLevel:lp.maxLevel;0044 <span class="keyword">for</span> d = lp.minDelta:lp.maxDelta0045 l2 = l + d;0046 <span class="keyword">if</span> (l2 > numLevels) <span class="keyword">continue</span>; <span class="keyword">end</span>0047 featureMaps(cc).origImage = maps(idx(l)).origImage;0048 featureMaps(cc).label = sprintf(<span class="string">'%s (%d-%d)'</span>,lab,l2,l);0049 featureMaps(cc).data = <a href="attenuateBorders.html" class="code" title="function result = attenuateBorders(data,borderSize)">attenuateBorders</a>(abs(maps(idx(l)).data - maps(idx(l2)).data),<span class="keyword">...</span>0050 borderSize);0051 csLevels(cc).centerLevel = l2;0052 csLevels(cc).surroundLevel = l;0053 featureMaps(cc).date = <a href="timeString.html" class="code" title="function s = timeString()">timeString</a>;0054 featureMaps(cc).parameters = params;0055 cc = cc + 1;0056 <span class="keyword">end</span>0057 <span class="keyword">end</span></pre></div><hr><address>Generated on Fri 07-Sep-2007 14:42:18 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?