GestureRecognitionToolkit  Version: 0.1.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 
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( 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 
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 reset()
ClassLabelFilter(UINT minimumCount=1, UINT bufferSize=1)
virtual bool process(const VectorDouble &inputVector)
virtual bool saveModelToFile(std::string filename) const
bool setMinimumCount(UINT minimumCount)
UINT filter(UINT predictedClassLabel)
UINT minimumCount
The minimum count sets the minimum number of class label values that must be present in the class lab...
CircularBuffer< UINT > buffer
The class label filter buffer.
virtual bool deepCopyFrom(const PostProcessing *postProcessing)
UINT bufferSize
The size of the Class Label Filter buffer.
bool init()
UINT filteredClassLabel
The most recent filtered class label value.
virtual bool loadModelFromFile(std::string filename)
bool setBufferSize(UINT bufferSize)
ClassLabelFilter & operator=(const ClassLabelFilter &rhs)
virtual ~ClassLabelFilter()