13
$\begingroup$

I am looking for some good book, that simply show how you actually write a code in C, to do all the main DSP methods .

  1. FFT.
  2. Low-pass and high-pass filters.
  3. Auto-correlation.
  4. Noise processing.

And all the basics of DSP, from theory into a real code in C.

For example, I have got 1000 samples, now i would like to compute FFT of it, remove noises, then bring back to the time axis.

Is there something good that cover all of these?

$\endgroup$
3
  • 1
    $\begingroup$ Nice question! I changed a tag to reference-request because it seems to be what you're asking for. $\endgroup$
    – Peter K.
    Mar 4, 2016 at 17:58
  • 2
    $\begingroup$ Is DFFT a typo ? $\endgroup$
    – Gilles
    Mar 4, 2016 at 19:46
  • $\begingroup$ Yeah, there is no DFFT only FFT $\endgroup$
    – Brethlosze
    Jan 7, 2017 at 5:53

4 Answers 4

13
$\begingroup$

I can recommend you two books about DSP for C language.

Embree P. M. - C Language Algorithms for Digital Signal Processing

It is old and you can easily get it second-hand for a decent price. It covers pretty much all 4 topics that you described.

The other one I recommend is:

Malepati H. - Digital Media Processing: DSP Algorithms Using C

It covers way more topics (including error correction algorithms and image/video processing algorithms). The nice thing about that one is that test signals are provided to test your implementation.


I just recalled that there is another book on my desk which has some C code for DSP in it.

Press W. H. - Numerical Recipes: The Art of Scientific Computing

There are two chapters about the Fourier Transform and its applications.


One last suggestion - if you can, please use an existing C library instead of writing your own tools. There is no point in re-inventing the wheel.

$\endgroup$
5
  • 4
    $\begingroup$ like any other ability, inventing is best learned when started from simplest examples and practiced enough. So it is always benefical to invent the wheel not because it adds a value as an accomplishment, but because it enables the inventor to built up the necessary insight of nature of inventions. $\endgroup$
    – Fat32
    Mar 4, 2016 at 16:32
  • 3
    $\begingroup$ I totally agree with that. Nonetheless in 99% of projects that I've been doing there was no time to re-invent the wheel. On the other hand, when I am doing my own stuff at home, then in 99% of cases I am re-inventing the wheel to learn and improve the current tools. $\endgroup$
    – jojeck
    Mar 4, 2016 at 16:49
  • $\begingroup$ In my opinion, using existing libraries is kind of a mess, its not that you have them all in one framework, you have to depend on each one of them, and with DSP you always have different kinds of inputs, and things are much more complicated then just a black box that do this and that . $\endgroup$
    – Curnelious
    Mar 4, 2016 at 17:06
  • $\begingroup$ @Curnelious Eventhough you are right to some extent (and for some libraries) I cannot agree that all existing libraries are a mess. And we must admit we are all using them. The point is about the philosophy rather than the reality. $\endgroup$
    – Fat32
    Mar 4, 2016 at 17:22
  • $\begingroup$ One big upside of using well-known libraries is that user can be more or less sure that the code is in fact sort of reviewed. Quite often there can be some edge cases that people will not think of which can be quite problematic in some very specific situations. I can't think of DSP examples right now, but one very illustrative example of general type of problem is trying to calculate number of minutes from a certain date in past until right now. At first, it can look as simple as just getting number of days, but when clock time and calendar changes come into play, it gets very complicated. $\endgroup$
    – AndrejaKo
    Mar 4, 2016 at 20:52
7
$\begingroup$

I'd recommend Introduction to Signal Processing by S.J. Orfanidis. It's a great book with a good mix of theory and practice, and it also has code examples in C and Matlab. Once you've worked through it you'll know enough to carry on by yourself.

$\endgroup$
0
0
$\begingroup$

Embree P. M. - C Language Algorithms for Digital Signal Processing

was useful in my MSC work in building filters ... although you can build the headers with Matlab coder.... I only had problems with implementation of his fft which was with complex numbers instead if trig which is easier to implement in real life.

$\endgroup$
-1
$\begingroup$

You can look to the source code of openSAL and Octave sources of Matlab signal processing functions (not C, but useful). This is what I did.

$\endgroup$
1
  • $\begingroup$ This is a risky procedure.... Matlab code include so many nested functions and it is very likely to finishing reverse-engineering the code.... I tried this on the past and no i dint think a novice should do this $\endgroup$
    – Brethlosze
    Jan 7, 2017 at 5:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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