123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- #ifndef ConvolutionFeatureINCLUDE
- #define ConvolutionFeatureINCLUDE
- #include "core/vector/VectorT.h"
- #include "core/vector/MatrixT.h"
- #include "core/basics/Config.h"
- #include "vislearning/cbaselib/Feature.h"
- namespace OBJREC{
- class ConvolutionFeature : public Feature
- {
- protected:
-
-
-
-
-
-
- int window_size_x;
- int window_size_y;
- int window_size_z;
- int paramsLength;
- int numChannels;
- bool isColor;
- bool useSpatialPriors;
- NICE::Vector *params;
-
- void initializeParameterVector();
- public:
-
-
-
-
- ConvolutionFeature ( );
-
- ConvolutionFeature ( const int wsize_x,
- const int wsize_y,
- const bool color = false,
- const bool prior = false );
-
- ConvolutionFeature ( const int wsize_x,
- const int wsize_y,
- const int wsize_z,
- const bool color = false,
- const bool prior = false );
-
- ConvolutionFeature ( const NICE::Config *conf );
-
- ConvolutionFeature ( const ConvolutionFeature *convFeat );
-
- virtual ~ConvolutionFeature ( );
-
-
-
-
- bool isColorMode () const;
-
- NICE::Vector getParameterVector () const;
-
- void getFeatureVector ( const Example *example, NICE::Vector &vec ) const;
-
- int getParameterLength () const;
-
- void setParameterVector ( const NICE::Vector &vec );
-
- void setRandomParameterVector ();
-
- 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 ();
- };
- }
- #endif
|