GestureRecognitionToolkit  Version: 0.2.0
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(UINT bufferLength=100,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 
106  virtual bool saveModelToFile( std::string filename ) const;
107 
114  virtual bool loadModelFromFile( std::string filename );
115 
123  virtual bool saveModelToFile( std::fstream &file ) const;
124 
132  virtual bool loadModelFromFile( std::fstream &file );
133 
141  bool init(UINT bufferLength,UINT numDimensions);
142 
149  VectorFloat update(Float x);
150 
157  VectorFloat update(const VectorFloat &x);
158 
166 
167  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
168  using MLBase::train;
169  using MLBase::train_;
170  using MLBase::predict;
171  using MLBase::predict_;
172 
173 protected:
174  UINT bufferLength;
176 
178 };
179 
180 GRT_END_NAMESPACE
181 
182 #endif //GRT_MOVEMENT_INDEX_HEADER
virtual bool predict(VectorFloat inputVector)
Definition: MLBase.cpp:113
virtual bool predict_(VectorFloat &inputVector)
Definition: MLBase.cpp:115
virtual bool saveModelToFile(std::fstream &file) const
virtual bool train(ClassificationData trainingData)
Definition: MLBase.cpp:89
virtual bool loadModelFromFile(std::fstream &file)
virtual bool computeFeatures(const VectorFloat &inputVector)
virtual bool reset()
virtual bool train_(ClassificationData &trainingData)
Definition: MLBase.cpp:91
virtual bool deepCopyFrom(const FeatureExtraction *rhs)