31 #ifndef GRT_SWIPE_DETECTION_HEADER
32 #define GRT_SWIPE_DETECTION_HEADER
34 #include "../../CoreModules/Classifier.h"
35 #include "../../Util/ThresholdCrossingDetector.h"
36 #include "../../PreProcessingModules/MedianFilter.h"
48 SwipeDetector(
const unsigned int swipeIndex = 0,
const unsigned int swipeThreshold = 100,
49 const unsigned int hysteresisThreshold =0,
const unsigned int swipeDirection = POSITIVE_SWIPE,
bool useScaling=
false);
80 bool init(
const unsigned int numInputDimensions);
106 virtual bool clear();
113 virtual bool reset();
235 unsigned int swipeIndex;
236 unsigned int swipeDirection;
237 unsigned int contextFilterSize;
238 Float swipeIntegrationCoeff;
239 Float movementIntegrationCoeff;
240 Float swipeThreshold;
241 Float hysteresisThreshold;
243 Float movementVelocity;
244 Float movementThreshold;
245 Float contextFilteredValue;
247 GRT::ThresholdCrossingDetector thresholdDetector;
248 GRT::MedianFilter contextFilter;
253 enum SwipeDirections{POSITIVE_SWIPE=0,NEGATIVE_SWIPE};
258 #endif //GRT_SWIPE_DETECTION_HEADER
virtual bool predict_(VectorDouble &inputVector)
bool setMovementThreshold(const Float movementThreshold)
bool setSwipeIntegrationCoeff(const Float swipeIntegrationCoeff)
Float getHysteresisThreshold() const
SwipeDetector(const unsigned int swipeIndex=0, const unsigned int swipeThreshold=100, const unsigned int hysteresisThreshold=0, const unsigned int swipeDirection=POSITIVE_SWIPE, bool useScaling=false)
virtual ~SwipeDetector(void)
bool setContext(const bool context)
bool setSwipeThreshold(const Float swipeThreshold)
Float getContextValue() const
Float getMovementVelocity() const
virtual bool loadModelFromFile(std::fstream &file)
bool setSwipeDirection(const unsigned int swipeDirection)
Float getMovementThreshold() const
SwipeDetector & operator=(const SwipeDetector &rhs)
bool getSwipeDetected() const
bool setHysteresisThreshold(const Float hysteresisThreshold)
virtual bool deepCopyFrom(const Classifier *classifier)
virtual bool saveModelToFile(std::fstream &file) const
Float getSwipeIntegrationCoeff() const
virtual bool train_(ClassificationData &trainingData)
Float getSwipeThreshold() const
Float getSwipeValue() const
bool setSwipeIndex(const unsigned int swipeIndex)