intensim.m

来自「用matlab实现图像融合」· M 代码 · 共 25 行

M
25
字号
function fintens = intensim(f)%------------------------------------------------------------------------------%% intensim% Under the assumption that f is of class double, we linearly transform f into% an intensity image according to the definition of the Image Processing Toolbox% meaning that the values are contained in the range [0, 1].%% Design and implementation by:% Dr. Paul M. de Zeeuw <Paul.de.Zeeuw@cwi.nl>  http://homepages.cwi.nl/~pauldz/% Last Revision: July 18, 2003.% Copyright 2003 Stichting CWI, Amsterdam%------------------------------------------------------------------------------%fmin=min(min(f));fmax=max(max(f));if fmax == fmin   if abs(f(1,1)) < 0.000000001      fintens = zeros(size(f));   else      fintens = ones(size(f));   endelse  fintens = (f-fmin)/(fmax-fmin);end%------------------------------------------------------------------------------%

⌨️ 快捷键说明

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