12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /**
- * @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<int> *possibleClassNos;
- public:
- /** simple constructor */
- SemanticFeature ( const NICE::Config *conf,
- const std::set<int> *_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
|