WinnerTakeAllStdOptim.H

Go to the documentation of this file.
00001 /*!@file Neuro/WinnerTakeAllStdOptim.H Optimized version of WinnerTakeAllStd */
00002 
00003 // //////////////////////////////////////////////////////////////////// //
00004 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2000-2005   //
00005 // by the University of Southern California (USC) and the iLab at USC.  //
00006 // See http://iLab.usc.edu for information about this project.          //
00007 // //////////////////////////////////////////////////////////////////// //
00008 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00009 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00010 // in Visual Environments, and Applications'' by Christof Koch and      //
00011 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00012 // pending; application number 09/912,225 filed July 23, 2001; see      //
00013 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00014 // //////////////////////////////////////////////////////////////////// //
00015 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00016 //                                                                      //
00017 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00018 // redistribute it and/or modify it under the terms of the GNU General  //
00019 // Public License as published by the Free Software Foundation; either  //
00020 // version 2 of the License, or (at your option) any later version.     //
00021 //                                                                      //
00022 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00023 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00024 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00025 // PURPOSE.  See the GNU General Public License for more details.       //
00026 //                                                                      //
00027 // You should have received a copy of the GNU General Public License    //
00028 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00029 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00030 // Boston, MA 02111-1307 USA.                                           //
00031 // //////////////////////////////////////////////////////////////////// //
00032 //
00033 // Primary maintainer for this file: Rob Peters <rjpeters at usc dot edu>
00034 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Neuro/WinnerTakeAllStdOptim.H $
00035 // $Id: WinnerTakeAllStdOptim.H 10670 2009-01-23 19:42:06Z itti $
00036 //
00037 
00038 #ifndef NEURO_WINNERTAKEALLSTDOPTIM_H_DEFINED
00039 #define NEURO_WINNERTAKEALLSTDOPTIM_H_DEFINED
00040 
00041 #include "Neuro/WinnerTakeAll.H"
00042 
00043 // ######################################################################
00044 //! Optimized version of the standard winner-take-all
00045 // ######################################################################
00046 /*! This is an optimized version of WinnerTakeAllStd which should give
00047   the same results, but with better CPU efficiency. */
00048 class WinnerTakeAllStdOptim : public WinnerTakeAllAdapter
00049 {
00050 public:
00051   //! Ininitialized constructor
00052   /*! The WTA will be resized and initialized the first time input() is
00053     called */
00054   WinnerTakeAllStdOptim(OptionManager& mgr,
00055                    const std::string& descrName = "Optimized Winner-Take-All Std",
00056                    const std::string& tagName = "WinnerTakeAllStdOptim");
00057 
00058   //! Destructor
00059   virtual ~WinnerTakeAllStdOptim();
00060 
00061   //! Reset to initial state just after construction
00062   virtual void reset1();
00063 
00064 protected:
00065   //! Set new input currents for all neurons
00066   /*! This will initialize and resize the network if the network is
00067     currently uninitialized (e.g., just after construction or reset()). */
00068   virtual void input(const Image<float>& in);
00069 
00070   //! Return all our membrane potential voltages as an Image<float>
00071   virtual Image<float> getV() const;
00072 
00073   //! Integrate inputs until time t (in s) and update membrane potentials
00074   virtual void integrate(const SimTime& t, Point2D<int>& winner);
00075 
00076   //! Turn saccadic suppression on/off
00077   virtual void saccadicSuppression(const bool on);
00078 
00079   //! Turn blink suppression on/off
00080   virtual void blinkSuppression(const bool on);
00081 
00082 private:
00083 
00084   const SimTime itsTimeStep;// time step to use for difference equations (in s)
00085   float itsGe;        // excitatory conductance in Siemens
00086   float itsGi;        // inhibitory conductance in Siemens
00087   const float itsEl;  // driving potential for leak part, in Volts
00088   const float itsEe;  // driving potential for excitatory part, in Volts
00089   const float itsEi;  // driving potential for inhibitory part, in Volts
00090   const float itsC;   // capacitance in Farads
00091   const float itsVth; // spike threshold voltage in Volts
00092   Image<float> itsV;
00093   SimTime itsT;                 // time of last integration
00094   const float itsGleak;         // leak conductance in Siemens
00095   const float itsGinh;          // in Siemens
00096   const float itsGinput;        // in Siemens
00097 
00098   // GIN == Global Inhibitory Neuron
00099   const float itsGIN_Gl;  // GIN leak conductance in Siemens
00100   float itsGIN_Ge;        // GIN excitatory conductance in Siemens
00101   const float itsGIN_El;  // GIN driving potential for leak part, in Volts
00102   const float itsGIN_Ee;  // GIN driving potential for excitatory part, in V
00103   const float itsGIN_Ei;  // GIN driving potential for inhibitory part, in V
00104   const float itsGIN_C;   // GIN capacitance in Farads
00105   const float itsGIN_Vth; // GIN spike threshold voltage in Volts
00106   float itsGIN_V;         // GIN membrane potential in Volts
00107   Image<float> itsInputCopy;
00108 
00109   void inhibit();               // inhibit the whole layer
00110 
00111   class EvolveJob;
00112 };
00113 
00114 // ######################################################################
00115 /* So things look consistent in everyone's emacs... */
00116 /* Local Variables: */
00117 /* mode: c++ */
00118 /* indent-tabs-mode: nil */
00119 /* End: */
00120 
00121 #endif // NEURO_WINNERTAKEALLSTDOPTIM_H_DEFINED
Generated on Sun May 8 08:41:07 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3