Home > SaliencyToolbox > maxNormalize.m

maxNormalize

PURPOSE ^

maxNormalize - normalizes a set of maps according to params.

SYNOPSIS ^

function result = maxNormalize(maps,params,varargin)

DESCRIPTION ^

 maxNormalize - normalizes a set of maps according to params.

 resultMap = maxNormalize(maps,salParams)
    Normalizes all maps according to the normalization
    method specified in salParams.normtype.

 resultMap = maxNormalize(maps,salParams,minmax)
    Specify a dynamic range for the initial maximum 
    normalization of the input data (default: [0 10]).
    The special value minmax = [0 0] means that initial
    maximum normalization is omitted.

 See also maxNormalizeLocalMax, maxNormalizeIterative, makeSaliencyMap, defaultSaliencyParams.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % maxNormalize - normalizes a set of maps according to params.
0002 %
0003 % resultMap = maxNormalize(maps,salParams)
0004 %    Normalizes all maps according to the normalization
0005 %    method specified in salParams.normtype.
0006 %
0007 % resultMap = maxNormalize(maps,salParams,minmax)
0008 %    Specify a dynamic range for the initial maximum
0009 %    normalization of the input data (default: [0 10]).
0010 %    The special value minmax = [0 0] means that initial
0011 %    maximum normalization is omitted.
0012 %
0013 % See also maxNormalizeLocalMax, maxNormalizeIterative, makeSaliencyMap, defaultSaliencyParams.
0014 
0015 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0016 % by Dirk B. Walther and the California Institute of Technology.
0017 % See the enclosed LICENSE.TXT document for the license agreement.
0018 % More information about this project is available at:
0019 % http://www.saliencytoolbox.net
0020 
0021 function result = maxNormalize(maps,params,varargin)
0022 
0023 if (length(varargin) >= 1) mima = varargin{1}; 
0024 else mima = [0 10]; end
0025 
0026 for m = 1:length(maps)
0027 
0028   debugMsg('',maps(m));
0029 
0030   result(m) = maps(m);
0031 
0032   if strcmp(maps(m).label,'empty')
0033     debugMsg('Empty map - no normalization.');
0034     continue;
0035   end
0036   
0037   switch(params.normtype)
0038     case 'None'
0039       result(m).data = normalizeImage(maps(m).data,mima);
0040     case {'Standard','LocalMax'}
0041       result(m).data = maxNormalizeLocalMax(maps(m).data,mima);
0042     case 'Iterative'
0043       result(m).data = maxNormalizeIterative(maps(m).data,params.numIter,mima);
0044     otherwise
0045       error(['Unknown normalization type: ' params.normtype]);
0046   end
0047 
0048   debugMsg(sprintf('%s [%3.1f,%3.1f]',params.normtype,mima(1),mima(2)),result(m));
0049 
0050 end

Generated on Thu 18-Jul-2013 06:10:46 by m2html © 2005