SIFThough.H

Go to the documentation of this file.
00001 /*!@file SIFT/SIFThough.H Data structure for SIFT Hough transform */
00002 
00003 // //////////////////////////////////////////////////////////////////// //
00004 // The iLab Neuromorphic Vision C++ Toolkit - Copyright (C) 2001 by the //
00005 // 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: James Bonaiuto <bonaiuto@usc.edu>
00034 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/SIFT/SIFThough.H $
00035 // $Id: SIFThough.H 4938 2005-07-14 20:44:30Z rjpeters $
00036 //
00037 
00038 #ifndef SIFTHOUGH_H_DEFINED
00039 #define SIFTHOUGH_H_DEFINED
00040 
00041 #include <vector>
00042 
00043 //! SIFThough accumalates data for the Hough transform used in SIFT
00044 /*! This class is used to accumulate evidence for various possible
00045   geometric transforms which are compatible with pairs of matching
00046   keypoints. Here we do not solve the general affine transform
00047   problem, rather we rely on simple differences between the data
00048   available in Keypoint, namely: x, y, scale, and orientation. We tile
00049   each dimension into eight bins, yielding a total of 4096 bins. Each
00050   pair of matching keypoints votes for 16 bins with linear
00051   interpolation (i.e., for two adjacent bins in each dimension. The
00052   philosophy and implementation here is very similar to that of
00053   FeatureVector. */
00054 class SIFThough
00055 {
00056 public :
00057   //! Constructor
00058   SIFThough();
00059 
00060   //! Destructor
00061   ~SIFThough();
00062 
00063   //! add value
00064   /*! Linearly add a value. Indices are as follows:
00065     0.0 <= dx <= 8.0 : [0 .. 7]   dx=2.0 falls equally between bins 1 and 2;
00066     0.0 <= dy <= 8.0 : [0 .. 7]   dy=2.0 falls equally between bins 1 and 2;
00067     0.0 <= do <= 8.0 : [0 .. 7]   do=4.0 falls equally between bins 3 and 4;
00068     0.0 <= ds <= 8.0 : [0 .. 7]   ds=4.0 falls equally between bins 3 and 4;
00069   Note that the orientation dimension is different as it has Dirichlet
00070   boundary conditions. */
00071   void addValue(const float dx, const float dy, const float doo,
00072                 const float ds, const float value);
00073 
00074   //! Get the parameter values at the peak
00075   void getPeak(float& dx, float& dy, float& doo, float& ds) const;
00076 
00077 private:
00078   std::vector<float> itsData;        // vector of data
00079 };
00080 
00081 
00082 // ######################################################################
00083 // Inlined member functions
00084 // ######################################################################
00085 
00086 
00087 
00088 #endif
00089 
00090 // ######################################################################
00091 /* So things look consistent in everyone's emacs... */
00092 /* Local Variables: */
00093 /* indent-tabs-mode: nil */
00094 /* End: */
Generated on Sun May 8 08:42:17 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3