Home > SaliencyToolbox > centerSurroundTopDown.m

centerSurroundTopDown

PURPOSE ^

centerSurroundTopDown - pseudo center-surround for top-down maps.

SYNOPSIS ^

function [featureMaps,csLevels] = centerSurroundTopDown(pyr,salParams)

DESCRIPTION ^

 centerSurroundTopDown - pseudo center-surround for top-down maps.

 [featureMaps,csLevels] = centerSurroundTopDown(pyramid,salParams)
    Only resizes and border-attenuates the level maps of the pyramid.
    This version does NOT compute center-surround differences.
    It is meant for top-down attention maps fed in from an outside
    source, e.g. object-sensitive maps. This version was used in:
      Dirk B. Walther & Christof Koch (2007). Attention in 
      Hierarchical Models of Object Recognition. In P. Cisek, 
      T. Drew & J. F. Kalaska (Eds.), Progress in Brain Research: 
      Computational Neuroscience: Theoretical insights into brain 
      function. Amsterdam: Elsevier.

    featureMaps is a vector of maps with the results.
    csLevels returns the center and surround levels in
       pyramid for later reference.

 See also centerSurround, defaultSaliencyParams, makeSaliencyMap,
          dataStructures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % centerSurroundTopDown - pseudo center-surround for top-down maps.
0002 %
0003 % [featureMaps,csLevels] = centerSurroundTopDown(pyramid,salParams)
0004 %    Only resizes and border-attenuates the level maps of the pyramid.
0005 %    This version does NOT compute center-surround differences.
0006 %    It is meant for top-down attention maps fed in from an outside
0007 %    source, e.g. object-sensitive maps. This version was used in:
0008 %      Dirk B. Walther & Christof Koch (2007). Attention in
0009 %      Hierarchical Models of Object Recognition. In P. Cisek,
0010 %      T. Drew & J. F. Kalaska (Eds.), Progress in Brain Research:
0011 %      Computational Neuroscience: Theoretical insights into brain
0012 %      function. Amsterdam: Elsevier.
0013 %
0014 %    featureMaps is a vector of maps with the results.
0015 %    csLevels returns the center and surround levels in
0016 %       pyramid for later reference.
0017 %
0018 % See also centerSurround, defaultSaliencyParams, makeSaliencyMap,
0019 %          dataStructures.
0020 
0021 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0022 % by Dirk B. Walther and the California Institute of Technology.
0023 % See the enclosed LICENSE.TXT document for the license agreement.
0024 % More information about this project is available at:
0025 % http://www.saliencytoolbox.net
0026 
0027 function [featureMaps,csLevels] = centerSurroundTopDown(pyr,salParams)
0028 
0029 switch salParams.pyramidType
0030   case 'sqrt2'
0031     base = sqrt(0.5);
0032   case 'dyadic'
0033     base = 0.5;
0034   otherwise
0035     error(['Unknown pyramidType: ' salParams.pyramidType]);
0036 end
0037 
0038 siz = floor(pyr.origImage.size(1:2) * base^(salParams.levelParams.mapLevel-1));
0039 borderSize = round(max(siz)/20);
0040 
0041 for i = 1:length(pyr.levels)
0042   featureMaps(i) = pyr.levels(i);
0043   tmp = imresize(pyr.levels(i).data,siz,'nearest');
0044   featureMaps(i).data = attenuateBorders(tmp,borderSize);
0045   featureMaps(i).date = clock;
0046   featureMaps(i).parameters = salParams;
0047   csLevels(i).centerLevel = i;
0048   csLevels(i).surroundLevel = i;
0049 end

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