Home > SaliencyToolbox > defaultLevelParams.m

defaultLevelParams

PURPOSE ^

defaultLevelParams - returns a default levelParams structure.

SYNOPSIS ^

function levelParams = defaultLevelParams(pyramidType)

DESCRIPTION ^

 defaultLevelParams - returns a default levelParams structure.

 levelParams = defaultLevelParams
    Returns a default structure with saliency parameters.

 levelParams = defaultLevelParams(pyramidType)
    Initializes parameters for a particular pyramidType:
       'dyadic' - pyramids with downsampling by a factor of 2 (default)
       'sqrt2'  - pyramids with downsampling by a factor of sqrt(2)
    This makes a difference for the levels for the computation of the
    center-surround differences.

 See also guiLevelParams, centerSurround, winnerToImgCoords,
          defaultSaliencyParams, dataStructures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % defaultLevelParams - returns a default levelParams structure.
0002 %
0003 % levelParams = defaultLevelParams
0004 %    Returns a default structure with saliency parameters.
0005 %
0006 % levelParams = defaultLevelParams(pyramidType)
0007 %    Initializes parameters for a particular pyramidType:
0008 %       'dyadic' - pyramids with downsampling by a factor of 2 (default)
0009 %       'sqrt2'  - pyramids with downsampling by a factor of sqrt(2)
0010 %    This makes a difference for the levels for the computation of the
0011 %    center-surround differences.
0012 %
0013 % See also guiLevelParams, centerSurround, winnerToImgCoords,
0014 %          defaultSaliencyParams, dataStructures.
0015 
0016 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0017 % by Dirk B. Walther and the California Institute of Technology.
0018 % See the enclosed LICENSE.TXT document for the license agreement.
0019 % More information about this project is available at:
0020 % http://www.saliencytoolbox.net
0021 
0022 function levelParams = defaultLevelParams(pyramidType)
0023 
0024 if (nargin < 1)
0025   pyramidType = 'dyadic';
0026 end
0027 
0028 % These are the default levels for pyramidType='dyadic'.
0029 % Note for comparison with the iNVT C++ code:
0030 % Since Matlab starts counting at 1 and C++ at 0,
0031 % you need to subtract 1 from the *Level values to obtain
0032 % the equivalent values for the iNVT code.
0033 % The *Delta values stay the same, of course.
0034 levelParams.minLevel = 3;
0035 levelParams.maxLevel = 5;
0036 levelParams.minDelta = 3;
0037 levelParams.maxDelta = 4;
0038 levelParams.mapLevel = 5;
0039  
0040 
0041 % these are the modified values for 'sqrt2'
0042 if strcmp(pyramidType,'sqrt2')
0043   levelParams.minLevel = levelParams.minLevel*2 - 1;
0044   levelParams.maxLevel = levelParams.maxLevel*2 - 1;
0045   levelParams.mapLevel = levelParams.mapLevel*2 - 1;
0046   levelParams.minDelta = levelParams.minDelta*2;
0047   levelParams.maxDelta = levelParams.maxDelta*2;
0048 end
0049

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