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.
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
MovementDetector.h
Go to the documentation of this file.
1
31
#ifndef GRT_MOVEMENT_DETECTOR_HEADER
32
#define GRT_MOVEMENT_DETECTOR_HEADER
33
34
#include "../../CoreModules/MLBase.h"
35
36
namespace
GRT
{
37
38
class
MovementDetector
:
public
MLBase
{
39
public
:
40
MovementDetector
(
const
UINT numDimensions = 1,
const
double
upperThreshold = 1,
const
double
lowerThreshold = 0.9,
const
double
gamma = 0.95,
const
UINT searchTimeout = 0);
41
42
virtual
~
MovementDetector
();
43
44
virtual
bool
predict_
( VectorDouble &input );
45
52
virtual
bool
clear
();
53
60
virtual
bool
reset
();
61
69
virtual
bool
saveModelToFile
(fstream &file)
const
;
70
78
virtual
bool
loadModelFromFile
(fstream &file);
79
80
double
getUpperThreshold()
const
;
81
82
double
getLowerThreshold()
const
;
83
84
double
getMovementIndex()
const
;
85
86
double
getGamma()
const
;
87
88
bool
getMovementDetected()
const
;
89
90
bool
getNoMovementDetect()
const
;
91
92
UINT getState()
const
;
93
94
UINT getSearchTimeout()
const
;
95
96
bool
setUpperThreshold(
const
double
upperThreshold);
97
98
bool
setLowerThreshold(
const
double
lowerThreshold);
99
100
bool
setGamma(
const
double
gamma);
101
102
bool
setSearchTimeout(
const
UINT searchTimeout);
103
104
//Tell the compiler we are using the base class train method to stop hidden virtual function warnings
105
using
MLBase::saveModelToFile
;
106
using
MLBase::loadModelFromFile
;
107
108
protected
:
109
110
UINT state;
111
UINT searchTimeout;
112
double
upperThreshold;
113
double
lowerThreshold;
114
double
movementIndex;
115
double
gamma;
116
bool
firstSample;
117
bool
movementDetected;
118
bool
noMovementDetected;
119
Timer
searchTimer;
120
VectorDouble lastSample;
121
122
public
:
123
enum
SearchStates{SEARCHING_FOR_MOVEMENT=0,SEARCHING_FOR_NO_MOVEMENT,SEARCH_TIMEOUT};
124
125
};
126
127
}
128
129
#endif //GRT_MOVEMENT_DETECTOR_HEADER
GRT::MLBase::saveModelToFile
virtual bool saveModelToFile(string filename) const
Definition:
MLBase.cpp:135
GRT::MovementDetector::predict_
virtual bool predict_(VectorDouble &input)
Definition:
MovementDetector.cpp:29
GRT::MLBase::loadModelFromFile
virtual bool loadModelFromFile(string filename)
Definition:
MLBase.cpp:157
GRT
Definition:
AdaBoost.cpp:25
GRT::MovementDetector
Definition:
MovementDetector.h:38
GRT::MovementDetector::saveModelToFile
virtual bool saveModelToFile(fstream &file) const
Definition:
MovementDetector.cpp:106
GRT::MLBase
Definition:
MLBase.h:70
GRT::MovementDetector::loadModelFromFile
virtual bool loadModelFromFile(fstream &file)
Definition:
MovementDetector.cpp:126
GRT::MovementDetector::reset
virtual bool reset()
Definition:
MovementDetector.cpp:94
GRT::Timer
Definition:
Timer.h:42
GRT::MovementDetector::clear
virtual bool clear()
Definition:
MovementDetector.cpp:84
ngillian
Documents
dev
libs
grt
GRT
CoreAlgorithms
MovementDetector
MovementDetector.h
Generated on Wed Mar 4 2015 12:47:19 for GestureRecognitionToolkit by
1.8.9.1