Abstract class standing for a feature filter (counts the high / low values, computes the average…) More...
#include <filter.h>
Public Member Functions | |
| Filter () | |
| Default constructor : does nothing yet. | |
| virtual | ~Filter () |
| Destructor (inherited from FeatureExtractor) | |
| FeatureExtractor * | bind (FeatureExtractor *extr) |
| Binds the filter to the output of an extractor (or another filter). Returns the old one. | |
| bool | extract (std::deque< uint16_t > data, int size=0) |
| Extract data This method should not be reimplemented by the user. The given parameters are ignored : the data is drawn from the upstream extractor without taking care of the raw data. | |
| virtual void | transform (vector< float > data)=0 |
| Do the actual computation on the features. | |
| virtual float | min () |
| Default min is the min of the parent. | |
| virtual float | max () |
| Default max is the max of the parent. | |
Public Member Functions inherited from FeatureExtractor | |
| FeatureExtractor (int chunkSize=0) | |
| Constructor. Can set the typical chunk size. | |
| virtual | ~FeatureExtractor () |
| Virtual destructor : enables each extractor to delete arrays. | |
| bool | extract (std::deque< uint16_t > data, int size, size_t start) |
| Idem, but the buffer starts at index start instead (circular buffer) | |
| virtual float | value (int index=0)=0 |
| Retrieve the results (from the index). Some values may be out of bounds. | |
| virtual float | safeValue (int index=0) |
| Retrieve the results, with the bounds respected (we apply a min / max) | |
| virtual float | value (int index, float low, float high) |
| Retrieve the results, with other bounds. | |
| virtual int | size ()=0 |
| Get the number of available values. | |
| virtual void | setFloat (string key, float value) |
| Set a float parameter. | |
| virtual void | setInt (string key, int value) |
| Set a int parameter. | |
| virtual float | getFloat (string key) |
| Get a float parameter. | |
| virtual int | getInt (string key) |
| Get a int parameter. | |
| virtual void | setString (string key, string value) |
| Set a string parameter. | |
| virtual string | getString (string key) |
| Get a string parameter. | |
| virtual void | clear () |
| Clear the memory of the extractor (so that the previously computed results don't infer to the next ones) | |
Protected Member Functions | |
| virtual void | parentChanged () |
| Callback called when the upstream extractor changes. | |
Protected Attributes | |
| FeatureExtractor * | mExtr |
| The extractor from which the data is drawn. | |
Abstract class standing for a feature filter (counts the high / low values, computes the average…)
|
virtual |
Extract data This method should not be reimplemented by the user. The given parameters are ignored : the data is drawn from the upstream extractor without taking care of the raw data.
Extract data.
Implements FeatureExtractor.
1.8.1.1