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.
ClassLabelFilter.h
Go to the documentation of this file.
1 
33 #ifndef GRT_CLASS_LABEL_FILTER_HEADER
34 #define GRT_CLASS_LABEL_FILTER_HEADER
35 
36 #include "../Util/GRTCommon.h"
37 #include "../CoreModules/PostProcessing.h"
38 
39 GRT_BEGIN_NAMESPACE
40 
41 class GRT_API ClassLabelFilter : public PostProcessing{
42 public:
54  ClassLabelFilter(UINT minimumCount = 1,UINT bufferSize = 1);
55 
64 
68  virtual ~ClassLabelFilter();
69 
76  ClassLabelFilter& operator=(const ClassLabelFilter &rhs);
77 
86  virtual bool deepCopyFrom(const PostProcessing *postProcessing);
87 
96  virtual bool process(const VectorDouble &inputVector);
97 
105  virtual bool reset();
106 
114  virtual bool saveModelToFile( std::string filename ) const;
115 
123  virtual bool saveModelToFile( std::fstream &file ) const;
124 
132  virtual bool loadModelFromFile( std::string filename );
133 
141  virtual bool loadModelFromFile( std::fstream &file );
142 
150  bool init(UINT minimumCount,UINT bufferSize);
151 
158  UINT filter(UINT predictedClassLabel);
159 
165  UINT getFilteredClassLabel(){ return filteredClassLabel; }
166 
176  bool setMinimumCount(UINT minimumCount);
177 
186  bool setBufferSize(UINT bufferSize);
187 
188 protected:
191  UINT bufferSize;
193 
195 };
196 
197 GRT_END_NAMESPACE
198 
199 #endif //GRT_CLASS_LABEL_FILTER_HEADER
virtual bool deepCopyFrom(const PostProcessing *postProcessing)
virtual bool process(const VectorFloat &inputVector)
virtual bool loadModelFromFile(std::string filename)
UINT minimumCount
The minimum count sets the minimum number of class label values that must be present in the class lab...
virtual bool reset()
CircularBuffer< UINT > buffer
The class label filter buffer.
UINT bufferSize
The size of the Class Label Filter buffer.
bool init()
UINT filteredClassLabel
The most recent filtered class label value.
virtual bool saveModelToFile(std::string filename) const