📄 centersurroundtopdown.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 centerSurroundTopDown</title> <meta name="keywords" content="centerSurroundTopDown"> <meta name="description" content="centerSurroundTopDown - pseudo center-surround for top-down 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> > centerSurroundTopDown.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>centerSurroundTopDown</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>centerSurroundTopDown - pseudo center-surround for top-down 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] = centerSurroundTopDown(pyr,salParams) </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"> centerSurroundTopDown - pseudo center-surround for top-down maps. [featureMaps,csLevels] = centerSurroundTopDown(pyramid,salParams) Only resizes and border-attenuates the level maps of the pyramid. This version does NOT compute center-surround differences. It is meant for top-down attention maps fed in from an outside source, e.g. object-sensitive maps. This version was used in: Dirk B. Walther & Christof Koch (2007). Attention in Hierarchical Models of Object Recognition. In P. Cisek, T. Drew & J. F. Kalaska (Eds.), Progress in Brain Research: Computational Neuroscience: Theoretical insights into brain function. Amsterdam: Elsevier. 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="centerSurround.html" class="code" title="function [featureMaps,csLevels] = centerSurround(pyr,params)">centerSurround</a>, <a href="defaultSaliencyParams.html" class="code" title="function params = defaultSaliencyParams(varargin)">defaultSaliencyParams</a>, <a href="makeSaliencyMap.html" class="code" title="function [salmap, saliencyData] = makeSaliencyMap(img, salParams, varargin)">makeSaliencyMap</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="fatal.html" class="code" title="function fatal(message)">fatal</a> fatal(message) - exits with a fatal error message.</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">% centerSurroundTopDown - pseudo center-surround for top-down maps.</span>0002 <span class="comment">%</span>0003 <span class="comment">% [featureMaps,csLevels] = centerSurroundTopDown(pyramid,salParams)</span>0004 <span class="comment">% Only resizes and border-attenuates the level maps of the pyramid.</span>0005 <span class="comment">% This version does NOT compute center-surround differences.</span>0006 <span class="comment">% It is meant for top-down attention maps fed in from an outside</span>0007 <span class="comment">% source, e.g. object-sensitive maps. This version was used in:</span>0008 <span class="comment">% Dirk B. Walther & Christof Koch (2007). Attention in</span>0009 <span class="comment">% Hierarchical Models of Object Recognition. In P. Cisek,</span>0010 <span class="comment">% T. Drew & J. F. Kalaska (Eds.), Progress in Brain Research:</span>0011 <span class="comment">% Computational Neuroscience: Theoretical insights into brain</span>0012 <span class="comment">% function. Amsterdam: Elsevier.</span>0013 <span class="comment">%</span>0014 <span class="comment">% featureMaps is a vector of maps with the results.</span>0015 <span class="comment">% csLevels returns the center and surround levels in</span>0016 <span class="comment">% pyramid for later reference.</span>0017 <span class="comment">%</span>0018 <span class="comment">% See also centerSurround, defaultSaliencyParams, makeSaliencyMap,</span>0019 <span class="comment">% dataStructures.</span>0020 0021 <span class="comment">% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007</span>0022 <span class="comment">% by Dirk B. Walther and the California Institute of Technology.</span>0023 <span class="comment">% See the enclosed LICENSE.TXT document for the license agreement.</span>0024 <span class="comment">% More information about this project is available at:</span>0025 <span class="comment">% http://www.saliencytoolbox.net</span>0026 0027 <a name="_sub0" href="#_subfunctions" class="code">function [featureMaps,csLevels] = centerSurroundTopDown(pyr,salParams)</a>0028 0029 <span class="keyword">switch</span> salParams.pyramidType0030 <span class="keyword">case</span> <span class="string">'sqrt2'</span>0031 base = sqrt(0.5);0032 <span class="keyword">case</span> <span class="string">'dyadic'</span>0033 base = 0.5;0034 <span class="keyword">otherwise</span>0035 <a href="fatal.html" class="code" title="function fatal(message)">fatal</a>([<span class="string">'Unknown pyramidType: '</span> salParams.pyramidType]);0036 <span class="keyword">end</span>0037 0038 siz = floor(pyr.origImage.size(1:2) * base^(salParams.levelParams.mapLevel-1));0039 borderSize = round(max(siz)/20);0040 0041 <span class="keyword">for</span> i = 1:length(pyr.levels)0042 featureMaps(i) = pyr.levels(i);0043 tmp = imresize(pyr.levels(i).data,siz,<span class="string">'nearest'</span>);0044 featureMaps(i).data = <a href="attenuateBorders.html" class="code" title="function result = attenuateBorders(data,borderSize)">attenuateBorders</a>(tmp,borderSize);0045 featureMaps(i).date = <a href="timeString.html" class="code" title="function s = timeString()">timeString</a>;0046 featureMaps(i).parameters = salParams;0047 csLevels(i).centerLevel = i;0048 csLevels(i).surroundLevel = i;0049 <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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -