Take the 2-minute tour ×
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It's 100% free, no registration required.

I have exposure to MATLAB and have some basic exposure to signal processing and plotting in MATLAB... but I am more comfortable with C/C++ than MATLAB because I have been working in Image processing with OpenCV... I was just curious: Is there any DSP library or platform (as OpenCV is for image processing) for doing signal processing in C/C++?

share|improve this question
1  
One example that is skewed toward wireless communications applications is GNU Radio. –  Jason R Feb 2 '13 at 2:48
1  
There are lots of FFT libraries in C/C++. FFTW is a particularly fast one. –  Jim Clay Feb 2 '13 at 3:49
3  
One problem with getting good answers to this question is that "signal processing" is an exceedingly-broad term encompassing many domain-specific subfields. I would call OpenCV a signal processing library, but that doesn't make it useful to someone who uses DSP for communications, for instance. Perhaps you could narrow your query. –  Jason R Feb 5 '13 at 18:24
1  
Re: @JimClay 's comment: FFTW is a great library. If you need to use C-source code in a project, you might want to check out KissFFT. It's not as well optimized, but it's pretty good, and as the name might suggest it's rather simple to read through the source code. sourceforge.net/projects/kissfft –  Dave C Feb 8 '13 at 15:33
add comment

5 Answers 5

Octave is a multi-platform open source math and matrix toolkit. It has a command line interpreter aimed to be very similar to MATLAB, but there is also a C++ API available for use. Since you refer to signal processing in contrast to image processing, I assume you mean audio processing, so you might need to look into the "signal" and "audio" packages in octave (which provide e.g. wavread). Keep in mind however, that the API is primarily designed for internal use in the octave CLI, and that it is considered not stable (i.e. the bindings might change). Also, since the library is not primarily meant to be linked with, the documentation is poor to say the least.

Alternatively, there is also GNU Scientific Library, which is not primarily aimed at signal processing, but provides complex numbers, matrices, fft and so on. On Windows, you would have to compile that yourself using Cygwin.

share|improve this answer
add comment

Have you checked out gnuradio? They have blocks similar to what is used in signal processing. When I used to a few years ago, there were a large number of blocks that were already available and more in the works, all written in C++. The blocks were glued together using python, but a complete C++ implementation was in the works.

share|improve this answer
add comment

Intel's Integrated Performance Primitives (IPP) C++ library has both signal processing and image processing components.

share|improve this answer
add comment

I haven't used it, but have heard good things about armadillo ( http://arma.sourceforge.net/ ) for matlab-like functionality. There are a few others like it, but it seems that armadillo is optimized and actively developed.

Part of the appeal of octave, matlab, or python/numpy/scipy (sometimes called "pylab") is the simple syntax along with an interactive interpreter with tab completions. This can speed up development quite a bit.

With python/numpy, it's possible to wrap a dll with a python wrapper, and use it from within the interactive interpreter. I believe this can also be done with matlab, but I'm unsure if this can be done in octave. Be warned, however, that this can be slightly complicated in python/numpy though I've found the benefits to be worth the cost in the past when performance is critical.

share|improve this answer
add comment

Armadillo does a great job for linear algebra in C++ (pretty fast via expression templates), and can be certainly used for signal processing as well. Apart from supporting matrices with various element types, it has support for 3rd order tensors (cubes), which are useful in image processing.

There is also a related C++ library known as IT++, which is not as fast as Armadillo, but it has more pre-built classes geared towards signal processing and communication.

share|improve this answer
    
Update: as of version 4.0+, Armadillo now has functions for 1D FFT, 2D FFT, and convolution –  mtall Mar 26 at 16:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.