Mercurial > hg > libxtract
comparison src/xtract_window_private.h @ 107:3e648eec95cb
- Added new helper functions: xtract_windowed() and xtract_features_from_subframes()
- Added windowing functions (window.c)
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Fri, 28 Dec 2007 19:34:51 +0000 |
parents | |
children | e4f704649c50 |
comparison
equal
deleted
inserted
replaced
106:3693573a07fa | 107:3e648eec95cb |
---|---|
1 /* libxtract feature extraction library | |
2 * | |
3 * Copyright (C) 2006 Jamie Bullock | |
4 * | |
5 * This program is free software; you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation; either version 2 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program; if not, write to the Free Software | |
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
18 * USA. | |
19 */ | |
20 | |
21 /* xtract_window_private.h: declares window generation functions */ | |
22 | |
23 #define PI 3.1415926535897931 | |
24 | |
25 /** \brief generate a Gaussian window | |
26 * | |
27 * \param *window a pointer to an array to contain the window data | |
28 * \param N the number of elements in the array pointed to by *window | |
29 * \param sd the standard deviation of the "distribution" represented by the Gaussian curve. The higher the value of sd, the wider the curve. Generally sd <= 0.5 | |
30 * | |
31 */ | |
32 void gauss(float *window, const int N, const float sd); | |
33 | |
34 /** \brief generate a Hamming window | |
35 * | |
36 * \param *window a pointer to an array to contain the window data | |
37 * \param N the number of elements in the array pointed to by *window | |
38 * | |
39 */ | |
40 void hamming(float *window, const int N); | |
41 | |
42 /** \brief generate a Hann window | |
43 * | |
44 * \param *window a pointer to an array to contain the window data | |
45 * \param N the number of elements in the array pointed to by *window | |
46 * | |
47 */ | |
48 void hann(float *window, const int N); | |
49 | |
50 /** \brief generate a Bartlett window | |
51 * | |
52 * \param *window a pointer to an array to contain the window data | |
53 * \param N the number of elements in the array pointed to by *window | |
54 * | |
55 */ | |
56 void bartlett(float *window, const int N); | |
57 | |
58 /** \brief generate a Triangular window | |
59 * | |
60 * \param *window a pointer to an array to contain the window data | |
61 * \param N the number of elements in the array pointed to by *window | |
62 * | |
63 */ | |
64 void triangular(float *window, const int N); | |
65 | |
66 /** \brief generate a Bartlett-Hann window | |
67 * | |
68 * \param *window a pointer to an array to contain the window data | |
69 * \param N the number of elements in the array pointed to by *window | |
70 * | |
71 */ | |
72 void bartlett_hann(float *window, const int N); | |
73 | |
74 /** \brief generate a Blackman window | |
75 * | |
76 * \param *window a pointer to an array to contain the window data | |
77 * \param N the number of elements in the array pointed to by *window | |
78 * | |
79 */ | |
80 void blackman(float *window, const int N); | |
81 | |
82 /** \brief generate a Kaiser window | |
83 * | |
84 * \param *window a pointer to an array to contain the window data | |
85 * \param N the number of elements in the array pointed to by *window | |
86 * \param alpha The larger the value of |alpha|, the narrower the window becomes | |
87 * | |
88 */ | |
89 void kaiser(float *window, const int N, const float alpha); | |
90 | |
91 /** \brief generate a Blackman-Harris window | |
92 * | |
93 * \param *window a pointer to an array to contain the window data | |
94 * \param N the number of elements in the array pointed to by *window | |
95 * | |
96 */ | |
97 void blackman_harris(float *window, const int N); | |
98 |