Extracts the High ZCR Ratio (ZCR stands for Zero Crossing Rate) More...
#include <hzcrr.h>
Public Member Functions | |
| HZCRRExtr (int chunkSize=0) | |
| Default constructor. | |
| ~HZCRRExtr () | |
| Destructor. | |
| ZCRExtr * | setZCRExtractor (ZCRExtr *extr) |
| Set the ZCR extractor (the previous one is returned) | |
| bool | extract (std::deque< uint16_t > data, int size) |
| Run the algorithm and store the results. | |
| float | value (int index=0) |
| Retrieve the results (from the index). The values are usually between -1 and 1. | |
| int | size () |
| Get the number of available values. | |
| float | min () |
| Lower bound on outputted values. | |
| float | max () |
| Upper bound on outputted values. | |
| void | setFloat (string key, float value) |
| Set a float parameter (available : "bound") | |
| void | setInt (string key, int value) |
| Set a int parameter (available : "chunksNumber") | |
| float | getFloat (string key) |
| Get a float parameter (available : "bound") | |
| int | getInt (string key) |
| Get a int parameter (available : "chunksNumber") | |
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 | 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 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) | |
Extracts the High ZCR Ratio (ZCR stands for Zero Crossing Rate)
This value is defined by Lie Lu, Hong-Jiang Zhang by the percentage of the frames that have ZCR above 1.5 the average on an 1 sec window.
|
virtual |
Run the algorithm and store the results.
Run the algorithm and store the results Implementation : A ZCR extractor is set, and can be used outside the extractor, so that the values aren't computed twice.
A ZCR history is created : we compute the ZCR for each frame and update the HZCRR. The history is a circular buffer.
Implements FeatureExtractor.
|
virtual |
Get a int parameter (available : "chunksNumber")
Get a int parameter (available : "chunkSize")
Reimplemented from FeatureExtractor.
|
virtual |
Set a int parameter (available : "chunksNumber")
Set a int parameter (available : "chunkSize")
Reimplemented from FeatureExtractor.
Set the ZCR extractor (the previous one is returned)
Set the ZCR extractor that should be used by this extractor.
1.8.1.1