loadimage.m

来自「显著区域检测。求的图像中感兴趣区域的位置」· M 代码 · 共 31 行

M
31
字号
% 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 initializeImage, dataStructures.% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007% by Dirk B. Walther and the California Institute of Technology.% See the enclosed LICENSE.TXT document for the license agreement. % More information about this project is available at: % http://www.saliencytoolbox.netfunction imgData = loadImage(Image)declareGlobal;if isnan(Image.data)  imgData = imread([IMG_DIR Image.filename]);else  imgData = Image.data;endif isa(imgData,'uint8')  imgData = im2double(imgData);end

⌨️ 快捷键说明

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