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.
ClassLabelChangeFilter.h
Go to the documentation of this file.
1 
32 #ifndef GRT_CLASS_LABEL_CHANGE_FILTER_HEADER
33 #define GRT_CLASS_LABEL_CHANGE_FILTER_HEADER
34 
35 #include "../Util/GRTCommon.h"
36 #include "../CoreModules/PostProcessing.h"
37 
38 GRT_BEGIN_NAMESPACE
39 
40 class GRT_API ClassLabelChangeFilter : public PostProcessing{
41 public:
46 
55 
59  virtual ~ClassLabelChangeFilter();
60 
67  ClassLabelChangeFilter& operator=(const ClassLabelChangeFilter &rhs);
68 
77  virtual bool deepCopyFrom(const PostProcessing *postProcessing) override;
78 
87  virtual bool process(const VectorDouble &inputVector) override;
88 
96  virtual bool reset() override;
97 
105  virtual bool save( std::fstream &file ) const override;
106 
114  virtual bool load( std::fstream &file ) override;
115 
121  bool init();
122 
129  UINT filter(const UINT predictedClassLabel);
130 
136  UINT getFilteredClassLabel() const { return filteredClassLabel; }
137 
143  bool getChange() const;
144 
150  static std::string getId();
151 
152  //Tell the compiler we are using the following functions from the MLBase class to stop hidden virtual function warnings
153  using MLBase::save;
154  using MLBase::load;
155 
156 protected:
157  UINT filteredClassLabel;
158  bool labelChanged;
159 
160 private:
161  static const std::string id;
163 };
164 
165 GRT_END_NAMESPACE
166 
167 #endif //GRT_CLASS_LABEL_CHANGE_FILTER_HEADER
std::string getId() const
Definition: GRTBase.cpp:85
virtual bool deepCopyFrom(const PostProcessing *postProcessing)
virtual bool reset()
Definition: MLBase.cpp:147
virtual bool process(const VectorFloat &inputVector)
virtual bool save(const std::string &filename) const
Definition: MLBase.cpp:167
This is the main base class that all GRT PostProcessing algorithms should inherit from...
bool init()
virtual bool load(const std::string &filename)
Definition: MLBase.cpp:190