GestureRecognitionToolkit  Version: 0.1.0
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
TimeDomainFeatures.h
Go to the documentation of this file.
1 
29 #ifndef GRT_TIME_DOMAIN_FEATURES_HEADER
30 #define GRT_TIME_DOMAIN_FEATURES_HEADER
31 
32 #include "../../CoreModules/FeatureExtraction.h"
33 #include "../../Util/Util.h"
34 
35 GRT_BEGIN_NAMESPACE
36 
38 public:
41  TimeDomainFeatures(UINT bufferLength=100,UINT numFrames=10,UINT numDimensions = 1,bool offsetInput = false,bool useMean = true,bool useStdDev = true,bool useEuclideanNorm = true,bool useRMS = true);
42 
49 
53  virtual ~TimeDomainFeatures();
54 
62 
71  virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction);
72 
81  virtual bool computeFeatures(const VectorFloat &inputVector);
82 
90  virtual bool reset();
91 
98  virtual bool saveModelToFile( std::string filename ) const;
99 
106  virtual bool loadModelFromFile( std::string filename );
107 
115  virtual bool saveModelToFile( std::fstream &file ) const;
116 
124  virtual bool loadModelFromFile( std::fstream &file );
125 
129  bool init(UINT bufferLength,UINT numFrames,UINT numDimensions,bool offsetInput,bool useMean,bool useStdDev,bool useEuclideanNorm,bool useRMS);
130 
137  VectorFloat update(Float x);
138 
145  VectorFloat update(const VectorFloat &x);
146 
153 
160 
161  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
162  using MLBase::train;
163  using MLBase::train_;
164  using MLBase::predict;
165  using MLBase::predict_;
166 
167 protected:
168  UINT bufferLength;
169  UINT numFrames;
170  bool offsetInput;
171  bool useMean;
172  bool useStdDev;
173  bool useEuclideanNorm;
174  bool useRMS;
176 
178 };
179 
180 GRT_END_NAMESPACE
181 
182 #endif //GRT_TIME_DOMAIN_FEATURES_HEADER
virtual bool predict(VectorFloat inputVector)
Definition: MLBase.cpp:112
virtual bool predict_(VectorFloat &inputVector)
Definition: MLBase.cpp:114
virtual bool saveModelToFile(std::string filename) const
virtual bool train(ClassificationData trainingData)
Definition: MLBase.cpp:88
virtual bool computeFeatures(const VectorFloat &inputVector)
CircularBuffer< VectorFloat > getBufferData()
virtual bool loadModelFromFile(std::string filename)
VectorFloat update(Float x)
virtual bool train_(ClassificationData &trainingData)
Definition: MLBase.cpp:90
virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction)
TimeDomainFeatures & operator=(const TimeDomainFeatures &rhs)