latest version v1.9 - last update 10 Apr 2010 |
00001 /* 00002 * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 00003 * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany 00004 * 00005 * This file is part of the LTI-Computer Vision Library (LTI-Lib) 00006 * 00007 * The LTI-Lib is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public License (LGPL) 00009 * as published by the Free Software Foundation; either version 2.1 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * The LTI-Lib is distributed in the hope that it will be 00013 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00014 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with the LTI-Lib; see the file LICENSE. If 00019 * not, write to the Free Software Foundation, Inc., 59 Temple Place - 00020 * Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 00024 /*---------------------------------------------------------------- 00025 * project ....: LTI Digital Image/Signal Processing Library 00026 * file .......: ltiGlobalFeatureExtractor.h 00027 * authors ....: Pablo Alvarado, Arnd Hannemann 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 9.8.2000 00030 * revisions ..: $Id: ltiGlobalFeatureExtractor.h,v 1.4 2006/02/07 18:59:58 ltilib Exp $ 00031 */ 00032 00033 #ifndef _LTI_GLOBAL_FEATURE_EXTRACTOR_H_ 00034 #define _LTI_GLOBAL_FEATURE_EXTRACTOR_H_ 00035 00036 #include "ltiObject.h" 00037 #include "ltiImage.h" 00038 #include "ltiFeatureExtractor.h" 00039 00040 namespace lti { 00041 /** 00042 * The feature extractors are functors which extract information from 00043 * the given images or channels, and leave this information in the form 00044 * of vectors of doubles. This class is the parent class for all 00045 * implemented feature extractors. 00046 */ 00047 class globalFeatureExtractor: virtual public featureExtractor { 00048 public: 00049 /** 00050 * the parameters for the class globalFeatureExtractor 00051 */ 00052 class parameters : virtual public featureExtractor::parameters { 00053 public: 00054 /** 00055 * default constructor 00056 */ 00057 parameters(); 00058 00059 /** 00060 * copy constructor 00061 * @param other the parameters object to be copied 00062 */ 00063 parameters(const parameters& other); 00064 00065 /** 00066 * destructor 00067 */ 00068 ~parameters(); 00069 00070 /** 00071 * returns name of this type 00072 */ 00073 const char* getTypeName() const; 00074 00075 /** 00076 * copy the contents of a parameters object 00077 * @param other the parameters object to be copied 00078 * @return a reference to this parameters object 00079 */ 00080 parameters& copy(const parameters& other); 00081 00082 /** 00083 * returns a pointer to a clone of the parameters 00084 */ 00085 virtual functor::parameters* clone() const; 00086 00087 }; 00088 00089 /** 00090 * default constructor 00091 */ 00092 globalFeatureExtractor(); 00093 00094 /** 00095 * copy constructor 00096 * @param other the object to be copied 00097 */ 00098 globalFeatureExtractor(const globalFeatureExtractor& other); 00099 00100 /** 00101 * destructor 00102 */ 00103 virtual ~globalFeatureExtractor(); 00104 00105 /** 00106 * returns the name of this type ("globalFeatureExtractor") 00107 */ 00108 virtual const char* getTypeName() const; 00109 00110 /** 00111 * generates feature vector for the src channel, and leaves the result 00112 * in the dest vector 00113 * @param src channel with the source data. 00114 * @param dest dvector where the result will be left. 00115 * @result a reference to the <code>dest</code>. 00116 */ 00117 virtual bool apply(const channel& src,dvector& dest) const; 00118 00119 /** 00120 * generates feature vector for the src channel, and leaves the result 00121 * in the dest vector 00122 * @param src channel8 with the source data. 00123 * @param dest vector<double> where the result will be left. 00124 * @result a reference to the <code>dest</code>. 00125 */ 00126 virtual bool apply(const channel8& src,dvector& dest) const; 00127 00128 /** 00129 * operates on a copy of the given parameters. 00130 * @param src image with the source data. 00131 * @param dest image where the result will be left. 00132 * @result a reference to the <code>dest</code>. 00133 */ 00134 virtual bool apply(const image& src,dvector& dest) const; 00135 00136 /** 00137 * copy data of "other" functor. 00138 * @param other the functor to be copied 00139 * @return a reference to this functor object 00140 */ 00141 globalFeatureExtractor& copy(const globalFeatureExtractor& other); 00142 00143 /** 00144 * returns a pointer to a clone of this functor. 00145 */ 00146 virtual functor* clone() const; 00147 00148 /** 00149 * returns used parameters 00150 */ 00151 const parameters& getParameters() const; 00152 }; 00153 } 00154 00155 #endif