Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A C++ library for IIR filter

Tags:

c++

filter

Do you know of some C++ library that implements IIR filters? I need something similar to Matlab's filter(B,A,X) function. Although it is not necessary, I would prefer an implementation of the IIR direct form 2.

like image 901
Enzo Avatar asked Jul 12 '11 13:07

Enzo


2 Answers

There's octave, an open-source MatLab clone, you could use its implementation (but it will likely require you use use its special matrix type).

Searching for "C++ IIR filter" finds a bunch of other projects, such as:

  • Signal Processing using C++
  • dspfilterscpp

There are also a variety of books on the subject, for example:

  • C++ algorithms for digital signal processing

In general, implementation of an IIR filter is very easy. Numerical robustness and efficient use of your computer hardware are more difficult, but they require knowledge of your specific application (e.g. resampling, etc) so aren't really suited for library implementations.

like image 56
Ben Voigt Avatar answered Nov 09 '22 13:11

Ben Voigt


You could also try GNURadio (gnuradio.org), which contains all sorts of components for software defined radio (including iir filters). It was originally all C++, now it is a bunch of modules written in C++ with python bindings, but you should still be able to use the C++ code directly.

like image 2
Gretchen Avatar answered Nov 09 '22 15:11

Gretchen