Copiste  0.1
 All Classes Functions Variables Enumerations Friends Pages
Public Member Functions
ZCRExtr Class Reference

Computes the Zero Crossing Rate. More...

#include <zcr.h>

Inheritance diagram for ZCRExtr:
FeatureExtractor

List of all members.

Public Member Functions

 ZCRExtr (int chunkSize=0)
 Default constructor.
bool extract (std::deque< uint16_t > data, int size)
 Run the algorithm and store the results. If the first value of the data is the same as the previous one, the last value will be used. This is just a matter of optimisation and the collisions aren't a problem since they won't change basicly the ZCR variations or the HZCRR.
float value (int index=0)
 Retrive the results (from the index). The values are usually between -1 and 1.
int size ()
 Get the number of available values.
void setFloat (string key, float value)
 Set a float parameter (available : none)
void setInt (string key, int value)
 Set a int parameter (available : none)
float getFloat (string key)
 Get a float parameter (available : none)
int getInt (string key)
 Get a int parameter (available : none)
- 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 float min ()
 Get the minimum value outputted (we assume that each value from a single extractor is about as big as the others)
virtual float max ()
 Get the maximum value outputted.
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)

Detailed Description

Computes the Zero Crossing Rate.


Member Function Documentation

bool ZCRExtr::extract ( std::deque< uint16_t >  data,
int  size 
)
virtual

Run the algorithm and store the results. If the first value of the data is the same as the previous one, the last value will be used. This is just a matter of optimisation and the collisions aren't a problem since they won't change basicly the ZCR variations or the HZCRR.

Run the algorithm and store the results.

Implements FeatureExtractor.


The documentation for this class was generated from the following files: