segHolder.H

Go to the documentation of this file.
00001 /*!@file VFAT/segHolder.H  holds properaties of objects
00002  */
00003 
00004 // //////////////////////////////////////////////////////////////////// //
00005 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
00006 // University of Southern California (USC) and the iLab at USC.         //
00007 // See http://iLab.usc.edu for information about this project.          //
00008 // //////////////////////////////////////////////////////////////////// //
00009 // Major portions of the iLab Neuromorphic Vision Toolkit are protected //
00010 // under the U.S. patent ``Computation of Intrinsic Perceptual Saliency //
00011 // in Visual Environments, and Applications'' by Christof Koch and      //
00012 // Laurent Itti, California Institute of Technology, 2001 (patent       //
00013 // pending; application number 09/912,225 filed July 23, 2001; see      //
00014 // http://pair.uspto.gov/cgi-bin/final/home.pl for current status).     //
00015 // //////////////////////////////////////////////////////////////////// //
00016 // This file is part of the iLab Neuromorphic Vision C++ Toolkit.       //
00017 //                                                                      //
00018 // The iLab Neuromorphic Vision C++ Toolkit is free software; you can   //
00019 // redistribute it and/or modify it under the terms of the GNU General  //
00020 // Public License as published by the Free Software Foundation; either  //
00021 // version 2 of the License, or (at your option) any later version.     //
00022 //                                                                      //
00023 // The iLab Neuromorphic Vision C++ Toolkit is distributed in the hope  //
00024 // that it will be useful, but WITHOUT ANY WARRANTY; without even the   //
00025 // implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      //
00026 // PURPOSE.  See the GNU General Public License for more details.       //
00027 //                                                                      //
00028 // You should have received a copy of the GNU General Public License    //
00029 // along with the iLab Neuromorphic Vision C++ Toolkit; if not, write   //
00030 // to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,   //
00031 // Boston, MA 02111-1307 USA.                                           //
00032 // //////////////////////////////////////////////////////////////////// //
00033 //
00034 // Primary maintainer for this file: T Nathan Mundhenk <mundhenk@usc.edu>
00035 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/VFAT/segHolder.H $
00036 // $Id: segHolder.H 6003 2005-11-29 17:22:45Z rjpeters $
00037 //
00038 
00039 // ############################################################
00040 // ############################################################
00041 // ##### --- VFAT ---
00042 // ##### Vision Feature Analysis Tool:
00043 // ##### T. Nathan Mundhenk nathan@mundhenk.com
00044 // ##### Laurent Itti itti@pollux.usc.edu
00045 // #####
00046 // ############################################################
00047 // ############################################################
00048 
00049 #ifndef SEGHOLDER_H_DEFINED
00050 #define SEGHOLDER_H_DEFINED
00051 
00052 #include "VFAT/targetInfo.H"
00053 
00054 
00055 //! A general purpose container for holding guassian signatures
00056 /*! This is a general purpose container for classes from the feature
00057     classifier. Note that there are no pointers and all data is copied
00058     this allows this object to be pulled off from the other code if
00059     need be which makes it portable to other machines or memory spaces
00060     so long as the object type is known.
00061 
00062     NOTE: To see how means and averages are computed along with how each
00063     sample is matched temporally, see the file covEstimate.C and the
00064     method covEstimate<T>::matchPmeanAccum(...) . This method does a
00065     nearest neighbor matching and computes temporal dynamics for each
00066     class.
00067 */
00068 template <class FLOAT, class INT, unsigned short dim> class segHolder :
00069   public vfatTargetInfo<FLOAT>
00070 {
00071 public:
00072   static const unsigned short dims = dim;
00073   inline segHolder();
00074   inline ~segHolder();
00075 
00076   //! is this tracker assigned yet to a target?
00077   bool                        noTargetYet;
00078   //! are we in a loss of track?
00079   bool                        LOT;
00080   //! did the loss of track cause us to reset the tracker?
00081   bool                        LOTandReset;
00082   //! what is the expected position of the target?
00083   unsigned short              expectedX;
00084   //! what is the expected position of the target?
00085   unsigned short              expectedY;
00086   //! what is the expected boundary of the target?
00087   unsigned short              expectedXmax;
00088   //! what is the expected boundary of the target?
00089   unsigned short              expectedYmax;
00090   //! what is the expected boundary of the target?
00091   unsigned short              expectedXmin;
00092   //! what is the expected boundary of the target?
00093   unsigned short              expectedYmin;
00094   //! boundary for tracking
00095   short                       boundaryX;
00096     //! boundary for tracking
00097   short                       boundaryY;
00098   //! number of loss of tracks in a row
00099   unsigned int                LOTcount;
00100   //! total number of blobs found this iteration
00101   unsigned int                blobNumber;
00102   //! how many blobs were killed
00103   unsigned int                killedBlobs;
00104   //! if we have a loss of track, what type is it
00105   unsigned int                LOTtype;
00106   //! how long have we been tracking without reset?
00107   unsigned long               totalLifeSpan;
00108   //! a name for the loss of track in LOTtype
00109   std::string                 LOTtypeName;
00110   //! this maps channels between covHolder and segHolder
00111   std::vector<unsigned short> channelMap;
00112   //! how much should any channel adapt
00113   std::vector<FLOAT>          channelAdapt;
00114   //! modifier from covHolder to tracker for standard dev.
00115   std::vector<FLOAT>          STDmod;
00116   //! modifier from covHolder to tracker for upper bound
00117   std::vector<FLOAT>          upperBoundMod;
00118   //! modifier from covHolder to tracker for lower bound
00119   std::vector<FLOAT>          lowerBoundMod;
00120 };
00121 
00122  // ######################################################################
00123 template <class FLOAT, class INT, unsigned short dim>
00124 inline segHolder<FLOAT,INT,dim>::segHolder() : vfatTargetInfo<FLOAT>(dim)
00125 {
00126   channelMap.resize(dim,0);
00127   channelAdapt.resize(dim,0.0F);
00128   STDmod.resize(dim,0.0F);
00129   upperBoundMod.resize(dim,0.0F);
00130   lowerBoundMod.resize(dim,0.0F);
00131   noTargetYet   = true;
00132   totalLifeSpan = 0;
00133 }
00134 
00135 // ######################################################################
00136 template <class FLOAT, class INT, unsigned short dim>
00137 inline segHolder<FLOAT,INT,dim>::~segHolder()
00138 {}
00139 
00140 #endif
Generated on Sun May 8 08:07:03 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3