LibXtract  0.6.2
Data Fields
xtract_mel_filter_ Struct Reference

An array of pointers to functions that perform the extraction. More...

#include <libxtract.h>

Data Fields

int n_filters
 
float ** filters
 

Detailed Description

An array of pointers to functions that perform the extraction.

Parameters
*dataa pointer to the start of the input data (usually the first element in an array)

Nthe number of elements to be processed

*argvan abitrary number of additional arguments, used to pass additional parameters to the function being called. All arguments are compulsary!
*resulta pointer to the first element in the result

Each function will iterate over N array elements, the first of which is

pointed to by *data. It is up to the calling function to ensure that the array is in the format expected by the function being called.

For scalar and delta features, *result will point to a single value.

For vector features it will point to the first element in an array.

Memory for this array must be allocated and freed by the calling

function.

All functions return an integer error code as descibed in the enumeration return_codes_

The preprocessor macro: XTRACT must be defined before this can be used

example:

#include <stdio.h>
#define XTRACT
#include "libxtract.h"

main () {
float values[] = {1.0, 2.0, 3.0, 4.0, 5.0};
int N = 5;
float mean;

xtract[MEAN]((void *)values, N, NULL, &mean);

printf("Mean = %.2f\n", mean);
}

The calling function may additionally make some tests against the value returned by xtractA structure to store a set of n_filters Mel filters


The documentation for this struct was generated from the following file: