GestureRecognitionToolkit  Version: 1.0 Revision: 04-03-15
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 namespace GRT{
40 
42 public:
54  ClassLabelFilter(UINT minimumCount = 1,UINT bufferSize = 1);
55 
64 
68  virtual ~ClassLabelFilter();
69 
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(string filename) const;
115 
123  virtual bool saveModelToFile(fstream &file) const;
124 
132  virtual bool loadModelFromFile(string filename);
133 
141  virtual bool loadModelFromFile(fstream &file);
142 
150  bool init(UINT minimumCount,UINT bufferSize);
151 
158  UINT filter(UINT predictedClassLabel);
159 
166 
176  bool setMinimumCount(UINT minimumCount);
177 
186  bool setBufferSize(UINT bufferSize);
187 
188 protected:
191  UINT bufferSize;
193 
195 };
196 
197 }//End of namespace GRT
198 
199 #endif //GRT_CLASS_LABEL_FILTER_HEADER
virtual bool saveModelToFile(string filename) const
virtual bool deepCopyFrom(const PostProcessing *postProcessing)
UINT bufferSize
The size of the Class Label Filter buffer.
Definition: AdaBoost.cpp:25
virtual bool process(const VectorDouble &inputVector)
UINT minimumCount
The minimum count sets the minimum number of class label values that must be present in the class lab...
bool init()
bool setMinimumCount(UINT minimumCount)
ClassLabelFilter & operator=(const ClassLabelFilter &rhs)
UINT filteredClassLabel
The most recent filtered class label value.
CircularBuffer< UINT > buffer
The class label filter buffer.
bool setBufferSize(UINT bufferSize)
UINT filter(UINT predictedClassLabel)
ClassLabelFilter(UINT minimumCount=1, UINT bufferSize=1)
virtual bool loadModelFromFile(string filename)