From 9bcdb2f6cb48da938975f618e36ebd54f67766cb Mon Sep 17 00:00:00 2001 From: Jamie Bullock Date: Sun, 8 Oct 2006 15:31:40 +0000 Subject: Added spectral centroid --- xtract/xtract_scalar.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xtract/xtract_scalar.h') diff --git a/xtract/xtract_scalar.h b/xtract/xtract_scalar.h index 6ddea98..bea7298 100644 --- a/xtract/xtract_scalar.h +++ b/xtract/xtract_scalar.h @@ -82,6 +82,15 @@ int xtract_skewness(float *data, int N, void *argv, float *result); */ int xtract_kurtosis(float *data, int N, void *argv, float *result); +/** \brief Extract the kurtosis of an input vector + * + * \param *data: a pointer to the first element in an array of floats represeting a frequency spectrum of size N/2 and a magnitude peak spectrum of size N/2 (This is the output format of xtract_peaks) + * \param N: the number of elements to be considered + * \param *argv: a pointer to NULL + * \param *result: the centroid of the values pointed to by *data + */ +int xtract_centroid(float *data, int N, void *argv, float *result); + /** \brief Calculate the Irregularity of an input vector using a method described by Krimphoff (1994) * * \param *data: a pointer to the first element in an array of floats representing the magnitude spectrum of an audio vector -- cgit v1.2.3