12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- /**
- * @file EOHFeature.h
- * @brief edge orientation histogram (Levi and Weiss, 2004)
- * @author Erik Rodner
- * @date 05/07/2008
- */
- #ifndef EOHFeatureINCLUDE
- #define EOHFeatureINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/basics/Config.h"
- #include "vislearning/cbaselib/Feature.h"
- namespace OBJREC {
- /** edge orientation feature of Levi and Weiss */
- class EOHFeature : public Feature
- {
- protected:
- enum {
- EOH_VALUE = 0,
- EOH_RATIO,
- EOH_DOMINANT_ORIENTATION,
- EOH_NUMTYPES
- };
- /** @{ feature parameter */
- int window_size_x;
- int window_size_y;
- int bin;
- int bin2; // used for EOH_RATIO
- int type;
- /** @} */
- /** @{ parameter for feature generation */
- int numScales;
- int numBins;
- double scaleStep;
- int maxdepth;
- /** @} */
- public:
- /** simple constructor */
- EOHFeature ( const NICE::Config *conf );
- /** internally used by EOHFeature::explode */
- EOHFeature () {
- bin = bin2 = 0;
- type = EOH_VALUE;
- };
- /** simple destructor */
- virtual ~EOHFeature();
- 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
|