41 #ifndef GRT_ZERO_CROSSING_COUNTER_HEADER
42 #define GRT_ZERO_CROSSING_COUNTER_HEADER
44 #include "../../CoreModules/FeatureExtraction.h"
45 #include "../../PreProcessingModules/Derivative.h"
46 #include "../../PreProcessingModules/DeadZone.h"
110 virtual bool reset();
258 enum ZeroCrossingFeatureIDs{NUM_ZERO_CROSSINGS_COUNTED=0,ZERO_CROSSING_MAGNITUDE,TOTAL_NUM_ZERO_CROSSING_FEATURES};
259 enum FeatureModes{INDEPENDANT_FEATURE_MODE=0,COMBINED_FEATURE_MODE};
264 #endif //GRT_ZERO_CROSSING_COUNTER_HEADER
virtual bool predict(VectorFloat inputVector)
bool setDeadZoneThreshold(Float deadZoneThreshold)
DeadZone deadZone
Used to remove small amounts of noise from the data.
virtual bool predict_(VectorFloat &inputVector)
VectorFloat update(Float x)
virtual bool train(ClassificationData trainingData)
virtual bool deepCopyFrom(const FeatureExtraction *featureExtraction)
UINT getSearchWindowSize()
Float getDeadZoneThreshold()
CircularBuffer< VectorFloat > dataBuffer
A buffer used to store the previous derivative data.
CircularBuffer< VectorFloat > getDataBuffer()
virtual ~ZeroCrossingCounter()
virtual bool saveModelToFile(std::string filename) const
UINT searchWindowSize
The size of the search window, i.e. the amount of previous data stored and searched.
ZeroCrossingCounter & operator=(const ZeroCrossingCounter &rhs)
virtual bool computeFeatures(const VectorFloat &inputVector)
UINT featureMode
The featureMode controls how the features are added to the feature vector.
bool setSearchWindowSize(UINT searchWindowSize)
virtual bool loadModelFromFile(std::string filename)
virtual bool train_(ClassificationData &trainingData)
Float deadZoneThreshold
The threshold value used for the dead zone filter.
Derivative derivative
Used to compute the derivative of the input signal.
bool setFeatureMode(UINT featureMode)
ZeroCrossingCounter(UINT searchWindowSize=20, Float deadZoneThreshold=0.01, UINT numDimensions=1, UINT featureMode=INDEPENDANT_FEATURE_MODE)