A Survey of Gaussian Convolution Algorithms
|
Filtering utility functions. More...
Filtering utility functions.
Copyright (c) 2012-2013, Pascal Getreuer All rights reserved.
This program is free software: you can redistribute it and/or modify it under, at your option, the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version, or the terms of the simplified BSD license.
You should have received a copy of these licenses along with this program. If not, see http://www.gnu.org/licenses/ and http://www.opensource.org/licenses/bsd-license.html.
Definition in file filter_util.c.
Go to the source code of this file.
Macros | |
#define | MAX_Q 7 |
Maximum possible value of q in init_recursive_filter() | |
Functions | |
void | recursive_filter_impulse (num *h, long N, const num *b, int p, const num *a, int q) |
Compute taps of the impulse response of a causal recursive filter. More... | |
void | init_recursive_filter (num *dest, const num *src, long N, long stride, const num *b, int p, const num *a, int q, num sum, num tol, long max_iter) |
Initialize a causal recursive filter with boundary extension. More... | |
void init_recursive_filter | ( | num * | dest, |
const num * | src, | ||
long | N, | ||
long | stride, | ||
const num * | b, | ||
int | p, | ||
const num * | a, | ||
int | q, | ||
num | sum, | ||
num | tol, | ||
long | max_iter | ||
) |
Initialize a causal recursive filter with boundary extension.
dest | destination array with size of at least q |
src | input signal of length N |
N | length of src |
stride | the stride between successive samples of src |
b | numerator coefficients |
p | largest delay of the numerator |
a | denominator coefficients |
q | largest delay of the denominator |
sum | the L^1 norm of the impulse response |
tol | accuracy tolerance |
max_iter | maximum number of samples to use for approximation |
This routine initializes a recursive filter,
with boundary extension by approximating the infinite sum
Definition at line 86 of file filter_util.c.
Compute taps of the impulse response of a causal recursive filter.
h | destination array of size N |
N | number of taps to compute (beginning from n = 0) |
b | numerator coefficients |
p | largest delay of the numerator |
a | denominator coefficients |
q | largest delay of the denominator |
Computes taps of the impulse response of the recursive filter
or equivalently
for n = 0, ..., N-1 where is the unit impulse. In the denominator coefficient array, element a[0] is not used.
Definition at line 47 of file filter_util.c.