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.
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 
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 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:112
virtual ~MovementIndex()
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 deepCopyFrom(const FeatureExtraction *featureExtraction)
virtual bool loadModelFromFile(std::string filename)
virtual bool reset()
virtual bool train_(ClassificationData &trainingData)
Definition: MLBase.cpp:90
MovementIndex & operator=(const MovementIndex &rhs)
MovementIndex(UINT bufferLength=100, UINT numDimensions=1)
VectorFloat update(Float x)
virtual bool computeFeatures(const VectorFloat &inputVector)
CircularBuffer< VectorFloat > getData()