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

📄 estimateshape.html

📁 显著区域检测。求的图像中感兴趣区域的位置
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"                "http://www.w3.org/TR/REC-html40/loose.dtd"><html><head>  <title>Description of estimateShape</title>  <meta name="keywords" content="estimateShape">  <meta name="description" content="estimateShape - estimates the shape of the attended proto-object region.">  <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; estimateShape.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>estimateShape</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>estimateShape - estimates the shape of the attended proto-object region.</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 shapeData = estimateShape(salmap,saliencyData,winner,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"> estimateShape - estimates the shape of the attended proto-object region. shapeData = estimateShape(salmap,saliencyData,winner,saliencyParams)    Estimates the shape of the attended proto-object region from the saliencyData:    salmap: the saliency map as returned by makeSaliencyMap.    saliencyData: the saliencyData as returned by makeSaliencyMap.    winner: the winning location in saliency map coordinates.    saliencyParams: the necesary parameters.    shapeData: structure containing information about the shape of    the attended regions, with the following fields:       origImage: the Image structure for the source image.          winner: the winning location in saliency map coordinates.      winningMap: the map for the most salient feature at the winner location.         iorMask: the mask used for shape-based inhibition of return.       binaryMap: a binary map of the attended region.    segmentedMap: the winning map segmented by the binary map.        shapeMap: a smoothed version of segmentedMap.            date: the time and date of the creation of this structure.    If finding an appropriate map for segmentation failed, an empty    shapeData structure is returned. The possible params.shapeModes for shape estimation are:     'None': no shape processing.     'shapeSM': use the saliency map.     'shapeCM': use the conspicuity map with the largest contribution                to the saliency map at the attended location.     'shapeFM': use the feature map with the largest contribution                to that conspicuity map.    'shapePyr': use the pyramid level (center or surround level) with                the largest ontribution to that feature map. For details of this method see:      Walther, D., and Koch, C. (2006). Modeling attention to salient       proto-objects. Neural Networks 19, pp. 1395-1407. See also <a href="makeSaliencyMap.html" class="code" title="function [salmap, saliencyData] = makeSaliencyMap(img, salParams, varargin)">makeSaliencyMap</a>, <a href="evolveWTA.html" class="code" title="function [wta,winner] = evolveWTA(wta)">evolveWTA</a>, <a href="dataStructures.html" class="code" title="">dataStructures</a>, <a href="runSaliency.html" class="code" title="function runSaliency(inputImage,varargin)">runSaliency</a>,          <a href="applyIOR.html" class="code" title="function wta = applyIOR(oldWTA,winner,params,varargin)">applyIOR</a>, <a href="shapeIOR.html" class="code" title="function wta = shapeIOR(wta,winner,params,shapeData)">shapeIOR</a>, <a href="defaultSaliencyParams.html" class="code" title="function params = defaultSaliencyParams(varargin)">defaultSaliencyParams</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="LTUsegmentMap.html" class="code" title="function [resultMap,segMaps] = LTUsegmentMap(map,seedPoint,varargin)">LTUsegmentMap</a>	LTUsegmentMap - segment map using a network of linear threshold units.</li><li><a href="clamp.html" class="code" title="function data = clamp(data,bottom,varargin)">clamp</a>	clamp - clamps data at the top and/or bottom.</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="fastSegmentMap.html" class="code" title="function resultMap = fastSegmentMap(map,seedPoint,varargin)">fastSegmentMap</a>	fastSegmentMap - segment map around a seedPoint.</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="gaussian.html" class="code" title="function kernel = gaussian(peak,sigma,maxhw,varargin)">gaussian</a>	gaussian - returns a 1d Gaussian kernel.</li><li><a href="normalizeImage.html" class="code" title="function res = normalizeImage(img,varargin)">normalizeImage</a>	normalizeImage - linearly normalize an array.</li><li><a href="randInt.html" class="code" title="function r = randInt(arg,varargin)">randInt</a>	randInt - create random integers.</li><li><a href="sepConv2PreserveEnergy.html" class="code" title="function result = sepConv2PreserveEnergy(filter1,filter2,data)">sepConv2PreserveEnergy</a>	sepConv2PreserveEnergy - energy preserving 2d convolution with separable filter</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="batchSaliency.html" class="code" title="function [salMaps,fixations] = batchSaliency(images,numFixations,params)">batchSaliency</a>	batchSaliency - batch processing of lists of images.</li><li><a href="guiSaliency.html" class="code" title="function varargout = guiSaliency(varargin)">guiSaliency</a>	guiSaliency - a graphical user interface (GUI) version of the saliency code.</li><li><a href="runSaliency.html" class="code" title="function runSaliency(inputImage,varargin)">runSaliency</a>	runSaliency - compute and display saliency map and fixations.</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">% estimateShape - estimates the shape of the attended proto-object region.</span>0002 <span class="comment">%</span>0003 <span class="comment">% shapeData = estimateShape(salmap,saliencyData,winner,saliencyParams)</span>0004 <span class="comment">%    Estimates the shape of the attended proto-object region from the saliencyData:</span>0005 <span class="comment">%</span>0006 <span class="comment">%    salmap: the saliency map as returned by makeSaliencyMap.</span>0007 <span class="comment">%    saliencyData: the saliencyData as returned by makeSaliencyMap.</span>0008 <span class="comment">%    winner: the winning location in saliency map coordinates.</span>0009 <span class="comment">%    saliencyParams: the necesary parameters.</span>0010 <span class="comment">%</span>0011 <span class="comment">%    shapeData: structure containing information about the shape of</span>0012 <span class="comment">%    the attended regions, with the following fields:</span>0013 <span class="comment">%       origImage: the Image structure for the source image.</span>0014 <span class="comment">%          winner: the winning location in saliency map coordinates.</span>0015 <span class="comment">%      winningMap: the map for the most salient feature at the winner location.</span>0016 <span class="comment">%         iorMask: the mask used for shape-based inhibition of return.</span>0017 <span class="comment">%       binaryMap: a binary map of the attended region.</span>0018 <span class="comment">%    segmentedMap: the winning map segmented by the binary map.</span>0019 <span class="comment">%        shapeMap: a smoothed version of segmentedMap.</span>0020 <span class="comment">%            date: the time and date of the creation of this structure.</span>0021 <span class="comment">%</span>0022 <span class="comment">%    If finding an appropriate map for segmentation failed, an empty</span>0023 <span class="comment">%    shapeData structure is returned.</span>0024 <span class="comment">%</span>0025 <span class="comment">% The possible params.shapeModes for shape estimation are:</span>0026 <span class="comment">%     'None': no shape processing.</span>0027 <span class="comment">%     'shapeSM': use the saliency map.</span>0028 <span class="comment">%     'shapeCM': use the conspicuity map with the largest contribution</span>0029 <span class="comment">%                to the saliency map at the attended location.</span>0030 <span class="comment">%     'shapeFM': use the feature map with the largest contribution</span>0031 <span class="comment">%                to that conspicuity map.</span>0032 <span class="comment">%    'shapePyr': use the pyramid level (center or surround level) with</span>0033 <span class="comment">%                the largest ontribution to that feature map.</span>0034 <span class="comment">%</span>0035 <span class="comment">% For details of this method see:</span>0036 <span class="comment">%      Walther, D., and Koch, C. (2006). Modeling attention to salient</span>0037 <span class="comment">%      proto-objects. Neural Networks 19, pp. 1395-1407.</span>0038 <span class="comment">%</span>0039 <span class="comment">% See also makeSaliencyMap, evolveWTA, dataStructures, runSaliency,</span>0040 <span class="comment">%          applyIOR, shapeIOR, defaultSaliencyParams.</span>0041 0042 <span class="comment">% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007</span>0043 <span class="comment">% by Dirk B. Walther and the California Institute of Technology.</span>0044 <span class="comment">% See the enclosed LICENSE.TXT document for the license agreement.</span>0045 <span class="comment">% More information about this project is available at:</span>0046 <span class="comment">% http://www.saliencytoolbox.net</span>0047 0048 <a name="_sub0" href="#_subfunctions" class="code">function shapeData = estimateShape(salmap,saliencyData,winner,params)</a>0049 0050 <span class="keyword">if</span> strcmpi(params.shapeMode,<span class="string">'None'</span>)0051   shapeData = [];0052   <span class="keyword">return</span>0053 <span class="keyword">end</span>0054 0055 shapeData.origImage = salmap.origImage;0056 shapeData.winner = winner;0057 0058 tmp = cat(1,saliencyData.CM);0059 tmp = cat(3,tmp.data);0060 [mx,CMidx] = max(tmp(winner(1),winner(2),:));0061 0062 <span class="comment">% first default: winning map is saliency map</span>0063 winMap = salmap;0064 winPos = {winner};

⌨️ 快捷键说明

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