GestureRecognitionToolkit  Version: 1.0 Revision: 04-03-15
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 namespace GRT{
40 
42 public:
49  MovementIndex(UINT bufferLength=100,UINT numDimensions = 1);
50 
56  MovementIndex(const MovementIndex &rhs);
57 
61  virtual ~MovementIndex();
62 
70 
79  virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction);
80 
89  virtual bool computeFeatures(const VectorDouble &inputVector);
90 
98  virtual bool reset();
99 
106  virtual bool saveModelToFile(string filename) const;
107 
114  virtual bool loadModelFromFile(string filename);
115 
123  virtual bool saveModelToFile(fstream &file) const;
124 
132  virtual bool loadModelFromFile(fstream &file);
133 
141  bool init(UINT bufferLength,UINT numDimensions);
142 
149  VectorDouble update(double x);
150 
157  VectorDouble update(const VectorDouble &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 }//End of namespace GRT
181 
182 #endif //GRT_MOVEMENT_INDEX_HEADER
MovementIndex(UINT bufferLength=100, UINT numDimensions=1)
virtual ~MovementIndex()
Definition: AdaBoost.cpp:25
virtual bool train(ClassificationData trainingData)
Definition: MLBase.cpp:80
virtual bool saveModelToFile(string filename) const
virtual bool computeFeatures(const VectorDouble &inputVector)
virtual bool loadModelFromFile(string filename)
CircularBuffer< VectorDouble > getData()
virtual bool predict(VectorDouble inputVector)
Definition: MLBase.cpp:104
virtual bool predict_(VectorDouble &inputVector)
Definition: MLBase.cpp:106
virtual bool reset()
MovementIndex & operator=(const MovementIndex &rhs)
VectorDouble update(double x)
virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction)
virtual bool train_(ClassificationData &trainingData)
Definition: MLBase.cpp:82