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"
61 ZeroCrossingCounter(UINT searchWindowSize = 20,Float deadZoneThreshold = 0.01,UINT numDimensions = 1,UINT featureMode = INDEPENDANT_FEATURE_MODE);
110 virtual bool reset();
157 bool init(UINT searchWindowSize,Float deadZoneThreshold,UINT numDimensions,UINT featureMode);
182 bool setSearchWindowSize(UINT searchWindowSize);
191 bool setFeatureMode(UINT featureMode);
200 bool setDeadZoneThreshold(Float deadZoneThreshold);
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)
DeadZone deadZone
Used to remove small amounts of noise from the data.
virtual bool predict_(VectorFloat &inputVector)
virtual bool train(ClassificationData trainingData)
UINT getSearchWindowSize()
Float getDeadZoneThreshold()
CircularBuffer< VectorFloat > dataBuffer
A buffer used to store the previous derivative data.
CircularBuffer< VectorFloat > getDataBuffer()
UINT searchWindowSize
The size of the search window, i.e. the amount of previous data stored and searched.
UINT featureMode
The featureMode controls how the features are added to the feature vector.
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.