showimage.m

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

M
56
字号
% showImage - displays an image in a convenient way.%% showImage(img) - displays image in a new window%    img can be of any numerical type or a logical, and it%        must have two (gray-scale) or three (RGB) dimensions.%    img can be an Image structure (see initializeImage).%    The image is scaled appropriately.%% showImage(img,title)%    Rename the figure window to title.%% showImage(img,...,doNormalize)%    If doNormalize is 1, the image is maximum-normalized %    (default: 0).%% h = showImage(...)%    returns the handle of the figure.%% See also displayImage, displayMap, displayMaps, 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 h = showImage(img,varargin)title = [];doNormalize = 0;for i = 1:length(varargin)  if (isstr(varargin{i}))    title = varargin{i};  else    doNormalize = varargin{i};  endendif (isa(img,'struct'))  if (~any(isnan(img.filename)) & (length(title) == 0))    title = img.filename;  end  hh = showImage(loadImage(img),title,doNormalize);else  if isempty(title)    hh = figure;  else    hh = figure('Name',title,'NumberTitle','off');  end  displayImage(img,doNormalize);endif (nargout > 0)  h = hh;end

⌨️ 快捷键说明

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