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.
DeadZone.h
Go to the documentation of this file.
1 
32 #ifndef GRT_DEADZONE_HEADER
33 #define GRT_DEADZONE_HEADER
34 
35 #include "../CoreModules/PreProcessing.h"
36 
37 GRT_BEGIN_NAMESPACE
38 
39 class GRT_API DeadZone : public PreProcessing{
40 public:
48  DeadZone(Float lowerLimit = -0.1,Float upperLimit = 0.1,UINT numDimensions = 1);
49 
55  DeadZone(const DeadZone &rhs);
56 
60  virtual ~DeadZone();
61 
68  DeadZone& operator=(const DeadZone &rhs);
69 
78  virtual bool deepCopyFrom(const PreProcessing *preProcessing);
79 
88  virtual bool process(const VectorFloat &inputVector);
89 
97  virtual bool reset();
98 
106  virtual bool save(std::fstream &file) const;
107 
115  virtual bool load(std::fstream &file);
116 
125  bool init(Float lowerLimit,Float upperLimit,UINT numDimensions);
126 
133  Float filter(const Float x);
134 
141  VectorFloat filter(const VectorFloat &x);
142 
149  bool setLowerLimit(Float lowerLimit);
150 
157  bool setUpperLimit(Float upperLimit);
158 
164  Float getLowerLimit(){ if( initialized ){ return lowerLimit; } return 0; }
165 
171  Float getUpperLimit(){ if( initialized ){ return upperLimit; } return 0; }
172 
173  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
174  using MLBase::save;
175  using MLBase::load;
176 
177 protected:
178  Float lowerLimit;
179  Float upperLimit;
180 
181  static RegisterPreProcessingModule< DeadZone > registerModule;
182 
183 };
184 
185 GRT_END_NAMESPACE
186 
187 #endif //GRT_DEADZONE_HEADER
188 
Float upperLimit
The upper limit of the dead-zone region.
Definition: DeadZone.h:179
virtual bool deepCopyFrom(const PreProcessing *rhs)
Definition: PreProcessing.h:57
Float getLowerLimit()
Definition: DeadZone.h:164
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
Float getUpperLimit()
Definition: DeadZone.h:171
Float lowerLimit
The lower limit of the dead-zone region.
Definition: DeadZone.h:178
virtual bool process(const VectorFloat &inputVector)
Definition: PreProcessing.h:73