Home > SaliencyToolbox > diskIOR.m

diskIOR

PURPOSE ^

diskIOR - applies disk-shaped inhibition of return.

SYNOPSIS ^

function wta = diskIOR(oldWTA,winner,params)

DESCRIPTION ^

 diskIOR - applies disk-shaped inhibition of return.

 wta = diskIOR(oldWTA,winner,saliencyParams)
    Applies disk-shaped inhibition of return to the
    winner-take-all structure oldWTA at position winner
    and returns the result as wta. The radius of the
    disk is taken from params.foaSize.

 See also applyIOR, shapeIOR, initializeWTA, defaultSaliencyParams, dataStructures.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % diskIOR - applies disk-shaped inhibition of return.
0002 %
0003 % wta = diskIOR(oldWTA,winner,saliencyParams)
0004 %    Applies disk-shaped inhibition of return to the
0005 %    winner-take-all structure oldWTA at position winner
0006 %    and returns the result as wta. The radius of the
0007 %    disk is taken from params.foaSize.
0008 %
0009 % See also applyIOR, shapeIOR, initializeWTA, defaultSaliencyParams, dataStructures.
0010 
0011 % This file is part of the SaliencyToolbox - Copyright (C) 2006-2013
0012 % by Dirk B. Walther and the California Institute of Technology.
0013 % See the enclosed LICENSE.TXT document for the license agreement.
0014 % More information about this project is available at:
0015 % http://www.saliencytoolbox.net
0016 
0017 function wta = diskIOR(oldWTA,winner,params)
0018 
0019 if (params.foaSize < 0)
0020   error(['invalid params.foaSize: ' num2str(params.foaSize)]);
0021 end  
0022 
0023 wta = oldWTA;
0024 
0025 xx = [1:size(wta.sm.V,2)] - winner(2);
0026 yy = [1:size(wta.sm.V,1)] - winner(1);
0027 [x,y] = meshgrid(xx,yy);
0028 d = x.*x + y.*y;
0029 
0030 pampl = 0.1 * wta.sm.V(winner(1),winner(2));
0031 mampl = 1e-4 * pampl;
0032 
0033 % this exponent should be '+1' for Matlab notation and '-1', because
0034 % foaSize is interpreted as radius here, not as diameter
0035 psdev = 0.3 * params.foaSize / 2^params.levelParams.mapLevel;
0036 
0037 msdev = 4.0 * psdev;
0038 g = pampl * exp(-0.5 * d / psdev^2) - ...
0039     mampl * exp(-0.5 * d / msdev^2);
0040 
0041 wta.sm.Ginh = wta.sm.Ginh + g;

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