diff options
author | Jamie Bullock <jamie@postlude.co.uk> | 2007-12-27 17:51:07 +0000 |
---|---|---|
committer | Jamie Bullock <jamie@postlude.co.uk> | 2007-12-27 17:51:07 +0000 |
commit | 24f2b43e28e755423cc0c319aafcf74e7db5b61b (patch) | |
tree | 7bb9ae8a66c9961fded7572bf2aeb650c55a370d /xtract/libxtract.h | |
parent | 6abcb447777c3ab48bdbe720fc3d84d3e8841317 (diff) | |
download | LibXtract-24f2b43e28e755423cc0c319aafcf74e7db5b61b.tar.gz LibXtract-24f2b43e28e755423cc0c319aafcf74e7db5b61b.tar.bz2 LibXtract-24f2b43e28e755423cc0c319aafcf74e7db5b61b.zip |
- Added extra argument to xtract_spectrum to give the option of normalising the magnitude/power coeffificients
- Removed duplicate code block (argc assignment) from descriptors.c
- Added some extra documentation to libxtract.h
Diffstat (limited to 'xtract/libxtract.h')
-rw-r--r-- | xtract/libxtract.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xtract/libxtract.h b/xtract/libxtract.h index 40512b0..4b948f1 100644 --- a/xtract/libxtract.h +++ b/xtract/libxtract.h @@ -25,8 +25,19 @@ * * This philosophy of 'cascading' features is followed throughout the library, for example with features that operate on the magnitude spectrum of a signal vector (e.g. 'irregularity'), the magnitude spectrum is not calculated 'inside' the respective function, instead, a pointer to the first element in an array containing the magnitude spectrum is passed in as an argument. * - * Hopefully this not only makes the library more efficient when computing large numbers of features, but also makes it more flexible because extraction functions can be combined arbitrarily (one can take the irregularility of the Mel Frequency Cepstral Coefficients for example). + * Hopefully this not only makes the library more efficient when computing large numbers of features, but also makes it more flexible because extraction functions can be combined arbitrarily (one can take the irregularility of the Mel Frequency Cepstral Coefficients for example). * + * All feature extraction functions follow the same prototype: + * +int xtract_function_name(const float *data, const int N, const void *argv, float *result){ + * + * \param const float *data points to an array of floats representing the input data + * \param const int N represents the number of elementes from *data to be considered in the calculation + * \param const void *argv represents an arbitrary list of arguments. Used to pass in values required by the feature calculation + * \param float *result points to an array of floats, or a single float represnting the result of the calculation + * + * + * It is up to the calling function to allocate enough memory for the *data, *argv, and *result, and to free it when required. Some feature extraction functions may also require an _init() function to be called in order to perform some initialisation. The struct xtract_function_descriptor_t is used to give an indication of recommended default values, and argc for the *argv array. * * LibXtract can be downloaded from http://www.sf.net/projects/libxtract * |