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

📄 fastsegmentmap.html

📁 显著区域检测。求的图像中感兴趣区域的位置
💻 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 fastSegmentMap</title>  <meta name="keywords" content="fastSegmentMap">  <meta name="description" content="fastSegmentMap - segment map around a seedPoint.">  <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="#">mfiles</a> &gt; fastSegmentMap.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 .\mfiles&nbsp;<img alt=">" border="0" src="../right.png"></a></td></tr></table>--><h1>fastSegmentMap</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>fastSegmentMap - segment map around a seedPoint.</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 resultMap = fastSegmentMap(map,seedPoint,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"> fastSegmentMap - segment map around a seedPoint. resultMap = fastSegmentMap(map,seedPoint)    Segment the map around the seedPoint, returns a binary    resultMap. This function is A LOT faster than LTUsegmentMap! resultMap = fastSegmentMap(map,seedPoint,thresh)    Use threshold thresh for segmentation (default: 0.1).    This threshold is relative to the map activity at    the seedPoint. This function corresponds to eqs. 13 and 14 in:      Walther, D., and Koch, C. (2006). Modeling attention to salient       proto-objects. Neural Networks 19, pp. 1395-1407. See also <a href="LTUsegmentMap.html" class="code" title="function [resultMap,segMaps] = LTUsegmentMap(map,seedPoint,varargin)">LTUsegmentMap</a>, <a href="estimateShape.html" class="code" title="function shapeData = estimateShape(salmap,saliencyData,winner,params)">estimateShape</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="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="estimateShape.html" class="code" title="function shapeData = estimateShape(salmap,saliencyData,winner,params)">estimateShape</a>	estimateShape - estimates the shape of the attended proto-object region.</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">% fastSegmentMap - segment map around a seedPoint.</span>0002 <span class="comment">%</span>0003 <span class="comment">% resultMap = fastSegmentMap(map,seedPoint)</span>0004 <span class="comment">%    Segment the map around the seedPoint, returns a binary</span>0005 <span class="comment">%    resultMap. This function is A LOT faster than LTUsegmentMap!</span>0006 <span class="comment">%</span>0007 <span class="comment">% resultMap = fastSegmentMap(map,seedPoint,thresh)</span>0008 <span class="comment">%    Use threshold thresh for segmentation (default: 0.1).</span>0009 <span class="comment">%    This threshold is relative to the map activity at</span>0010 <span class="comment">%    the seedPoint.</span>0011 <span class="comment">%</span>0012 <span class="comment">% This function corresponds to eqs. 13 and 14 in:</span>0013 <span class="comment">%      Walther, D., and Koch, C. (2006). Modeling attention to salient</span>0014 <span class="comment">%      proto-objects. Neural Networks 19, pp. 1395-1407.</span>0015 <span class="comment">%</span>0016 <span class="comment">% See also LTUsegmentMap, estimateShape, dataStructures.</span>0017 0018 <span class="comment">% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007</span>0019 <span class="comment">% by Dirk B. Walther and the California Institute of Technology.</span>0020 <span class="comment">% See the enclosed LICENSE.TXT document for the license agreement.</span>0021 <span class="comment">% More information about this project is available at:</span>0022 <span class="comment">% http://www.saliencytoolbox.net</span>0023 0024 <a name="_sub0" href="#_subfunctions" class="code">function resultMap = fastSegmentMap(map,seedPoint,varargin)</a>0025 0026 <span class="keyword">if</span> isempty(varargin) thresh = 0.05;0027 <span class="keyword">else</span> thresh = varargin{1}; <span class="keyword">end</span>0028 0029 eps = 0.001;0030 0031 resultMap.origImage = map.origImage;0032 resultMap.label = [<span class="string">'seg: '</span> map.label];0033 resultMap.parameters = map.parameters;0034 0035 seedVal = map.data(seedPoint(1),seedPoint(2));0036 <span class="keyword">if</span> (seedVal &lt; eps)0037   <a href="debugMsg.html" class="code" title="function debugMsg(message,varargin)">debugMsg</a>(sprintf(<span class="string">'seedVal = %g'</span>,seedVal));0038   resultMap.origImage = map.origImage;0039   resultMap.label = [<span class="string">'seg-0: '</span> map.label];0040   resultMap.data = zeros(size(map.data));0041   resultMap.date = <a href="timeString.html" class="code" title="function s = timeString()">timeString</a>;0042   resultMap.parameters = map.parameters;0043   segMaps = [];0044   <span class="keyword">return</span>;0045 <span class="keyword">end</span>0046   0047 bw = im2bw(map.data/seedVal,thresh);0048 labels = bwlabel(bw,4);0049 sVal = labels(seedPoint(1),seedPoint(2));0050 <span class="keyword">if</span> (sVal &gt; 0)0051   resultMap.data = double(labels == sVal);0052 <span class="keyword">else</span>0053   resultMap.data = zeros(size(map.data));0054 <span class="keyword">end</span>0055 0056 resultMap.date = <a href="timeString.html" class="code" title="function s = timeString()">timeString</a>;</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> &copy; 2003</address></body></html>

⌨️ 快捷键说明

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