00001 /*!@file Neuro/SaliencyMapStdOptim.H Optimized version of SaliencyMapStd */ 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/SaliencyMapStdOptim.H $ 00035 // $Id: SaliencyMapStdOptim.H 10723 2009-02-01 22:49:43Z itti $ 00036 // 00037 00038 #ifndef NEURO_SALIENCYMAPSTDOPTIM_H_DEFINED 00039 #define NEURO_SALIENCYMAPSTDOPTIM_H_DEFINED 00040 00041 #include "Neuro/SaliencyMap.H" 00042 00043 // ###################################################################### 00044 //! Optimized version of the standard saliency map 00045 // ###################################################################### 00046 /*! This is an optimized version of SaliencyMapStd. */ 00047 class SaliencyMapStdOptim : public SaliencyMapAdapter 00048 { 00049 public: 00050 //! Ininitialized constructor 00051 SaliencyMapStdOptim(OptionManager& mgr, 00052 const std::string& descrName = "Optimized Saliency Map Std", 00053 const std::string& tagName = "SaliencyMapStdOptim"); 00054 00055 //! Destructor 00056 virtual ~SaliencyMapStdOptim(); 00057 00058 //! Reset to initial state just after construction 00059 virtual void reset(); 00060 00061 protected: 00062 //! Callback for every clock tick, to run our diff equations in integrate() 00063 SIMCALLBACK_DECLARE(SaliencyMapStdOptim, SimEventClockTick); 00064 00065 //! Set new input currents for all neurons 00066 virtual void input(SimEventQueue& q, const Image<float>& in); 00067 00068 //! Difference-of-Gaussians inhibition of return 00069 virtual void depress(SimEventQueue& q, const Point2D<int>& winner, 00070 const double& pampl, const double& mampl, 00071 const double& psdev, const double& msdev); 00072 00073 //! Object-based inhibition of return 00074 virtual void depress(SimEventQueue& q, const Point2D<int>& winner, const double& ampl, 00075 const Image<byte>& objectMask); 00076 00077 //! Turn saccadic suppression on/off 00078 virtual void saccadicSuppression(SimEventQueue& q, const bool on); 00079 00080 //! Turn blink suppression on/off 00081 virtual void blinkSuppression(SimEventQueue& q, const bool on); 00082 00083 //! Return all our membrane potential voltages as an Image<float> 00084 virtual Image<float> getV() const; 00085 00086 //! Access function using Point2D<int> 00087 virtual float getV(const Point2D<int>& p) const; 00088 00089 private: 00090 SimTime itsTimeStep;// time step to use for difference equations (in s) 00091 SimTime itsT; // time of last integration 00092 00093 const float itsC; // capacitance in Farads 00094 const float itsGleak; // leak conductance in Siemens 00095 00096 Image<float> itsGinh; 00097 Image<float> itsI; 00098 Image<float> itsV; 00099 00100 OModelParam<float> itsGinhDecay; //!< decay for IOR inhibition 00101 00102 class UpdateJob; 00103 }; 00104 00105 // ###################################################################### 00106 /* So things look consistent in everyone's emacs... */ 00107 /* Local Variables: */ 00108 /* mode: c++ */ 00109 /* indent-tabs-mode: nil */ 00110 /* End: */ 00111 00112 #endif // NEURO_SALIENCYMAPSTDOPTIM_H_DEFINED