📄 loadimage.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 loadImage</title> <meta name="keywords" content="loadImage"> <meta name="description" content="loadImage - returns the imgData for the Image structure"> <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> > loadImage.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>loadImage</h1><h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2><div class="box"><strong>loadImage - returns the imgData for the Image structure</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 imgData = loadImage(Image) </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"> loadImage - returns the imgData for the Image structure imgData = loadImage(Image) Returns the imgData from one of two sources: (1) If Image.data is valid, it is returned after conversion to double (if necessary). (2) Otherwise, the image is loaded from [IMG_DIR Image.filename], converted to double and returned. See also <a href="initializeImage.html" class="code" title="function [Img,err] = initializeImage(varargin);">initializeImage</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="declareGlobal.html" class="code" title="">declareGlobal</a> declareGlobal - declares global variables.</li></ul>This function is called by:<ul style="list-style-image:url(../matlabicon.gif)"><li><a href="contrastModulate.html" class="code" title="function resultImg = contrastModulate(img, modulationMap, varargin)">contrastModulate</a> contrastModulate - contrast modulates an image according to a map</li><li><a href="displayImage.html" class="code" title="function displayImage(img,doNormalize)">displayImage</a> displayImage - displays an image in a convenient way in the current axes.</li><li><a href="makeBlueYellowPyramid.html" class="code" title="function [byPyr,bPyr,yPyr] = makeBlueYellowPyramid(image,type)">makeBlueYellowPyramid</a> makeBlueYellowPyramid - creates a blue-yellow opponency pyramid.</li><li><a href="makeHuePyramid.html" class="code" title="function huePyr = makeHuePyramid(image,type,hueParams,varargin)">makeHuePyramid</a> makeHuePyramid - creates a hue distance pyramid.</li><li><a href="makeIntensityPyramid.html" class="code" title="function intPyr = makeIntensityPyramid(image,type)">makeIntensityPyramid</a> makeIntensityPyramid - creates an intensity pyramid.</li><li><a href="makeRedGreenPyramid.html" class="code" title="function [rgPyr,rPyr,gPyr] = makeRedGreenPyramid(image,type)">makeRedGreenPyramid</a> makeRedGreenPyramid - creates a red-green opponency pyramid</li><li><a href="showImage.html" class="code" title="function h = showImage(img,varargin)">showImage</a> showImage - displays an image in a convenient way.</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">% loadImage - returns the imgData for the Image structure</span>0002 <span class="comment">%</span>0003 <span class="comment">% imgData = loadImage(Image)</span>0004 <span class="comment">% Returns the imgData from one of two sources:</span>0005 <span class="comment">% (1) If Image.data is valid, it is returned after conversion</span>0006 <span class="comment">% to double (if necessary).</span>0007 <span class="comment">% (2) Otherwise, the image is loaded from [IMG_DIR Image.filename],</span>0008 <span class="comment">% converted to double and returned.</span>0009 <span class="comment">%</span>0010 <span class="comment">% See also initializeImage, dataStructures.</span>0011 0012 <span class="comment">% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007</span>0013 <span class="comment">% by Dirk B. Walther and the California Institute of Technology.</span>0014 <span class="comment">% See the enclosed LICENSE.TXT document for the license agreement.</span>0015 <span class="comment">% More information about this project is available at:</span>0016 <span class="comment">% http://www.saliencytoolbox.net</span>0017 0018 <a name="_sub0" href="#_subfunctions" class="code">function imgData = loadImage(Image)</a>0019 0020 <a href="declareGlobal.html" class="code" title="">declareGlobal</a>;0021 0022 <span class="keyword">if</span> isnan(Image.data)0023 imgData = imread([IMG_DIR Image.filename]);0024 <span class="keyword">else</span>0025 imgData = Image.data;0026 <span class="keyword">end</span>0027 0028 <span class="keyword">if</span> isa(imgData,<span class="string">'uint8'</span>)0029 imgData = im2double(imgData);0030 <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 + -