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

📄 normalizeimage.m

📁 显著区域检测。求的图像中感兴趣区域的位置
💻 M
字号:
% normalizeImage - linearly normalize an array.%% res = normalizeImage(data);%    Linearly normalize data between 0 and 1.%% res = normalizeImage(img,range);%    Lineary normalize data between range(1) and range(2)%    instead of [0,1]. The special value range = [0 0]%    means that no normalization is performed, i.e., res = img.% 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 res = normalizeImage(img,varargin)if (length(varargin) >= 1) range = varargin{1};else range = [0,1]; endif ((range(1) == 0) & (range(2) == 0))  res = img;  return;endmx = max(img(:));mn = min(img(:));if (mx == mn)  res = img - mx + 0.5*sum(range);else  res = (img - mn) / (mx - mn) * abs(range(2)-range(1)) + min(range);end

⌨️ 快捷键说明

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