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.
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 
39 class GRT_API DoubleMovingAverageFilter : public PreProcessing {
40 public:
47  DoubleMovingAverageFilter(UINT filterSize = 5,UINT numDimensions = 1);
48 
55 
59  virtual ~DoubleMovingAverageFilter();
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 save(std::fstream &file) const;
106 
114  virtual bool load(std::fstream &file);
115 
124  bool init(UINT filterSize,UINT numDimensions);
125 
132  Float filter(const Float x);
133 
140  VectorFloat filter(const VectorFloat &x);
141 
147  VectorFloat getFilteredData(){ return processedData; }
148 
149  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
150  using MLBase::save;
151  using MLBase::load;
152 
153 protected:
154  UINT filterSize;
157 
159 
160 };
161 
162 GRT_END_NAMESPACE
163 
164 #endif //GRT_DOUBLE_MOVING_AVERAGE_FILTER_HEADER
165 
virtual bool deepCopyFrom(const PreProcessing *rhs)
Definition: PreProcessing.h:57
MovingAverageFilter filter2
The second moving average filter.
The MovingAverageFilter implements a low pass moving average filter.
UINT filterSize
The size of the filter.
virtual bool save(const std::string filename) const
Definition: MLBase.cpp:143
virtual bool reset()
virtual bool load(const std::string filename)
Definition: MLBase.cpp:167
virtual bool process(const VectorFloat &inputVector)
Definition: PreProcessing.h:73
MovingAverageFilter filter1
The first moving average filter.