evolvewta.m

来自「显著区域检测。求的图像中感兴趣区域的位置」· M 代码 · 共 53 行

M
53
字号
% evolveWTA - evolves the winner-take-all network by one time step.%% [wta,winner] = evolveWTA(wta)%    Evolves wta by one time step, returns the resulting wta,%    and returns the winner coordinates if a winner was found.%% See also evolveLeakyIntFire, runSaliency, dataStructures.% This file is part of the SaliencyToolbox - Copyright (C) 2006-2007% by Dirk B. Walther and the California Institute of Technology.% See the enclosed LICENSE.TXT document for the license agreement. % More information about this project is available at: % http://www.saliencytoolbox.netfunction [wta,winner] = evolveWTA(wta)time = wta.exc.time + wta.exc.timeStep;winner = [-1,-1];% first evolve the smwta.sm = evolveLeakyIntFire(wta.sm,time);% set the input into the excitatory WTA neurons to the output of the smwta.exc.I = wta.sm.V .* wta.exc.Ginput;% evolve the excitatory neurons of the WTA network[wta.exc,spikes] = evolveLeakyIntFire(wta.exc,time);% erase any inhibitions we might have hadwta.exc.Ginh = 0;% did anyone fire?if any(spikes(:))  idx = find(spikes); idx = idx(1);  [winner(1),winner(2)] = ind2sub(size(spikes),idx);      debugMsg(sprintf('winner: (%d,%d) at %f ms',winner(1),winner(2),time*1000));  debugMsg(sprintf('SM voltage at winner: %g mV above rest',wta.sm.V(idx)*1000));  % the inihibitory interneuron gets all excited about the winner  wta.inhib.Gexc = wta.inhib.Gleak * 10;end  % evolve the inhibitory interneuron[wta.inhib,spike] = evolveLeakyIntFire(wta.inhib,time);if (spike)  % trigger global inhibition  wta.exc.Ginh = 1e-2;    % no need to be excited anymore  wta.inhib.Gexc = 0;end

⌨️ 快捷键说明

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