GestureRecognitionToolkit  Version: 0.2.5
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
MovementIndex.h
Go to the documentation of this file.
1 
33 #ifndef GRT_MOVEMENT_INDEX_HEADER
34 #define GRT_MOVEMENT_INDEX_HEADER
35 
36 #include "../../CoreModules/FeatureExtraction.h"
37 #include "../../Util/Util.h"
38 
39 GRT_BEGIN_NAMESPACE
40 
41 class GRT_API MovementIndex : public FeatureExtraction{
42 public:
49  MovementIndex(const UINT bufferLength=100,const UINT numDimensions = 1);
50 
56  MovementIndex(const MovementIndex &rhs);
57 
61  virtual ~MovementIndex();
62 
69  MovementIndex& operator=(const MovementIndex &rhs);
70 
79  virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction);
80 
89  virtual bool computeFeatures(const VectorFloat &inputVector);
90 
98  virtual bool reset();
99 
107  virtual bool save( std::fstream &file ) const;
108 
116  virtual bool load( std::fstream &file );
117 
125  bool init(const UINT bufferLength,const UINT numDimensions);
126 
133  VectorFloat update(const Float x);
134 
141  VectorFloat update(const VectorFloat &x);
142 
149  CircularBuffer< VectorFloat > getData() const;
150 
151  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
152  using MLBase::save;
153  using MLBase::load;
154  using MLBase::train;
155  using MLBase::train_;
156  using MLBase::predict;
157  using MLBase::predict_;
158 
164  static std::string getId();
165 
166 protected:
167  UINT bufferLength;
169 
170 private:
172  static std::string id;
173 };
174 
175 GRT_END_NAMESPACE
176 
177 #endif //GRT_MOVEMENT_INDEX_HEADER
178 
std::string getId() const
Definition: GRTBase.cpp:85
virtual bool predict(VectorFloat inputVector)
Definition: MLBase.cpp:135
virtual bool predict_(VectorFloat &inputVector)
Definition: MLBase.cpp:137
virtual bool reset()
Definition: MLBase.cpp:147
virtual bool train(ClassificationData trainingData)
Definition: MLBase.cpp:107
virtual bool save(const std::string &filename) const
Definition: MLBase.cpp:167
virtual bool computeFeatures(const VectorFloat &inputVector)
virtual bool train_(ClassificationData &trainingData)
Definition: MLBase.cpp:109
virtual bool load(const std::string &filename)
Definition: MLBase.cpp:190
virtual bool deepCopyFrom(const FeatureExtraction *rhs)