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.
Main Page
Related Pages
Classes
Files
Examples
File List
File Members
MedianFilter.h
Go to the documentation of this file.
1
31
#ifndef GRT_MEDIAN_FILTER_HEADER
32
#define GRT_MEDIAN_FILTER_HEADER
33
34
#include "../CoreModules/PreProcessing.h"
35
36
GRT_BEGIN_NAMESPACE
37
38
class
MedianFilter
:
public
PreProcessing
{
39
public
:
46
MedianFilter
(UINT
filterSize
= 5,UINT numDimensions = 1);
47
53
MedianFilter
(
const
MedianFilter
&rhs);
54
58
virtual
~MedianFilter
();
59
66
MedianFilter
&
operator=
(
const
MedianFilter
&rhs);
67
76
virtual
bool
deepCopyFrom
(
const
PreProcessing
*preProcessing);
77
86
virtual
bool
process
(
const
VectorFloat
&inputVector);
87
95
virtual
bool
reset
();
96
104
virtual
bool
saveModelToFile
( std::string filename )
const
;
105
113
virtual
bool
saveModelToFile
( std::fstream &file)
const
;
114
122
virtual
bool
loadModelFromFile
( std::string filename );
123
131
virtual
bool
loadModelFromFile
( std::fstream &file );
132
140
bool
init
(UINT
filterSize
,UINT numDimensions);
141
148
Float
filter
(
const
Float x);
149
156
VectorFloat
filter
(
const
VectorFloat
&x);
157
163
UINT
getFilterSize
()
const
{
return
filterSize
; }
164
170
VectorFloat
getFilteredData
()
const
{
return
processedData; }
171
180
Vector< VectorFloat >
getDataBuffer
()
const
;
181
182
protected
:
183
UINT
filterSize
;
184
UINT
inputSampleCounter
;
185
CircularBuffer< VectorFloat >
dataBuffer
;
186
187
static
RegisterPreProcessingModule< MedianFilter >
registerModule;
188
};
189
190
GRT_END_NAMESPACE
191
192
#endif //GRT_MEDIAN_FILTER_HEADER
MedianFilter::getDataBuffer
Vector< VectorFloat > getDataBuffer() const
Definition:
MedianFilter.cpp:289
MedianFilter::getFilteredData
VectorFloat getFilteredData() const
Definition:
MedianFilter.h:170
MedianFilter::operator=
MedianFilter & operator=(const MedianFilter &rhs)
Definition:
MedianFilter.cpp:58
MedianFilter::reset
virtual bool reset()
Definition:
MedianFilter.cpp:114
MedianFilter::process
virtual bool process(const VectorFloat &inputVector)
Definition:
MedianFilter.cpp:95
MedianFilter::filter
Float filter(const Float x)
Definition:
MedianFilter.cpp:247
MedianFilter::dataBuffer
CircularBuffer< VectorFloat > dataBuffer
A buffer to store the previous N values, N = filterSize.
Definition:
MedianFilter.h:185
MedianFilter
Definition:
MedianFilter.h:38
MedianFilter::filterSize
UINT filterSize
The size of the filter.
Definition:
MedianFilter.h:183
MedianFilter::~MedianFilter
virtual ~MedianFilter()
Definition:
MedianFilter.cpp:54
MedianFilter::inputSampleCounter
UINT inputSampleCounter
A counter to keep track of the number of input samples.
Definition:
MedianFilter.h:184
CircularBuffer< VectorFloat >
MedianFilter::saveModelToFile
virtual bool saveModelToFile(std::string filename) const
Definition:
MedianFilter.cpp:119
MedianFilter::getFilterSize
UINT getFilterSize() const
Definition:
MedianFilter.h:163
PreProcessing
Definition:
PreProcessing.h:38
VectorFloat
Definition:
VectorFloat.h:33
RegisterPreProcessingModule< MedianFilter >
MedianFilter::MedianFilter
MedianFilter(UINT filterSize=5, UINT numDimensions=1)
Definition:
MedianFilter.cpp:28
Vector< VectorFloat >
PreProcessing::init
bool init()
Definition:
PreProcessing.cpp:92
MedianFilter::deepCopyFrom
virtual bool deepCopyFrom(const PreProcessing *preProcessing)
Definition:
MedianFilter.cpp:77
MedianFilter::loadModelFromFile
virtual bool loadModelFromFile(std::string filename)
Definition:
MedianFilter.cpp:155
GRT
PreProcessingModules
MedianFilter.h
Generated on Sun Feb 21 2016 20:06:26 for GestureRecognitionToolkit by
1.8.11