GestureRecognitionToolkit  Version: 0.2.5
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 
28 #ifndef GRT_DEADZONE_HEADER
29 #define GRT_DEADZONE_HEADER
30 
31 #include "../CoreModules/PreProcessing.h"
32 
33 GRT_BEGIN_NAMESPACE
34 
38 class GRT_API DeadZone : public PreProcessing{
39 public:
47  DeadZone( const Float lowerLimit = -0.1, const Float upperLimit = 0.1, const UINT numDimensions = 1 );
48 
54  DeadZone(const DeadZone &rhs);
55 
59  virtual ~DeadZone();
60 
67  DeadZone& operator=(const DeadZone &rhs);
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(Float lowerLimit,Float upperLimit,UINT numDimensions);
125 
132  Float filter(const Float x);
133 
140  VectorFloat filter(const VectorFloat &x);
141 
147  Float getLowerLimit() const;
148 
154  Float getUpperLimit() const;
155 
162  bool setLowerLimit(Float lowerLimit);
163 
170  bool setUpperLimit(Float upperLimit);
171 
177  static std::string getId();
178 
179  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
180  using MLBase::save;
181  using MLBase::load;
182 
183 protected:
184  Float lowerLimit;
185  Float upperLimit;
186 
187 private:
188  static const std::string id;
189  static RegisterPreProcessingModule< DeadZone > registerModule;
190 
191 };
192 
193 GRT_END_NAMESPACE
194 
195 #endif //GRT_DEADZONE_HEADER
196 
std::string getId() const
Definition: GRTBase.cpp:85
Float upperLimit
The upper limit of the dead-zone region.
Definition: DeadZone.h:185
virtual bool deepCopyFrom(const PreProcessing *rhs)
Definition: PreProcessing.h:58
virtual bool save(const std::string &filename) const
Definition: MLBase.cpp:167
virtual bool reset() override
The DeadZone class sets any values in the input signal that fall within the dead-zone region to zero...
Definition: DeadZone.h:38
Float lowerLimit
The lower limit of the dead-zone region.
Definition: DeadZone.h:184
virtual bool process(const VectorFloat &inputVector)
Definition: PreProcessing.h:74
virtual bool load(const std::string &filename)
Definition: MLBase.cpp:190