/** * @file SemanticFeature.h * @brief texton feature similar to jamie shottons idea * @author Erik Rodner * @date 05/07/2008 */ #ifndef SemanticFeatureINCLUDE #define SemanticFeatureINCLUDE #include "core/vector/VectorT.h" #include "core/vector/MatrixT.h" #include "core/basics/Config.h" #include "vislearning/cbaselib/Feature.h" namespace OBJREC { /** texton feature similar to jamie shottons idea */ class SemanticFeature : public Feature { protected: /** @{ feature parameter */ int window_size_x; int window_size_y; int shiftx; int shifty; int classno; /** @} */ /** @{ parameter for feature generation */ int numScales; double scaleStep; int maxdepth; int end_shiftx; int end_shifty; int step_shiftx; int step_shifty; /** @} */ const std::set *possibleClassNos; public: /** simple constructor */ SemanticFeature( const NICE::Config *conf, const std::set *_possibleClassNos ); /** simple constructor */ SemanticFeature( const NICE::Config *conf ); /** internally used by SemanticFeature::explode */ SemanticFeature () {}; /** simple destructor */ virtual ~SemanticFeature(); double val( const Example *example ) const; void explode ( FeaturePool & featurePool, bool variableWindow = true ) const; Feature *clone() const; Feature *generateFirstParameter () const; void restore (std::istream & is, int format = 0); void store (std::ostream & os, int format = 0) const; void clear (); }; } // namespace #endif