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.
DoubleMovingAverageFilter.h
Go to the documentation of this file.
1 
31 #ifndef GRT_DOUBLE_MOVING_AVERAGE_FILTER_HEADER
32 #define GRT_DOUBLE_MOVING_AVERAGE_FILTER_HEADER
33 
34 #include "../CoreModules/PreProcessing.h"
35 #include "MovingAverageFilter.h"
36 
37 GRT_BEGIN_NAMESPACE
38 
40 public:
47  DoubleMovingAverageFilter(UINT filterSize = 5,UINT numDimensions = 1);
48 
55 
60 
68 
77  virtual bool deepCopyFrom(const PreProcessing *preProcessing);
78 
87  virtual bool process(const VectorFloat &inputVector);
88 
96  virtual bool reset();
97 
105  virtual bool saveModelToFile(std::string filename) const;
106 
114  virtual bool saveModelToFile(std::fstream &file) const;
115 
123  virtual bool loadModelFromFile(std::string filename);
124 
132  virtual bool loadModelFromFile(std::fstream &file);
133 
142  bool init(UINT filterSize,UINT numDimensions);
143 
150  Float filter(const Float x);
151 
158  VectorFloat filter(const VectorFloat &x);
159 
165  VectorFloat getFilteredData(){ return processedData; }
166 
167 protected:
168  UINT filterSize;
171 
173 
174 };
175 
176 GRT_END_NAMESPACE
177 
178 #endif //GRT_DOUBLE_MOVING_AVERAGE_FILTER_HEADER
MovingAverageFilter filter2
The second moving average filter.
DoubleMovingAverageFilter & operator=(const DoubleMovingAverageFilter &rhs)
virtual bool saveModelToFile(std::string filename) const
The MovingAverageFilter implements a low pass moving average filter.
UINT filterSize
The size of the filter.
DoubleMovingAverageFilter(UINT filterSize=5, UINT numDimensions=1)
virtual bool loadModelFromFile(std::string filename)
MovingAverageFilter filter1
The first moving average filter.
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
virtual bool process(const VectorFloat &inputVector)