Tag Info

How can I work on DSP using C/C++?

MATLAB is a desktop computing environment, that's designed to make it easy to do math in batches. And if you were to have access to the MATLAB source code, you'd find that as you dig down into it, ...
• 8,646

How can I work on DSP using C/C++?

C/C++ is the standard language for real time and embedded signal processing. MATLAB is in most cases way too memory hungry and way too slow. There is a lot of signal processing happening in, for ...
• 32.6k

Fastest implementation of fft in C++?

I was also searching for fast FFT library to be used from C++. Let me share what I think the situation is in 2019. FFTW is the most popular FFT library. It has planty of features and it's often used ...
• 241
Accepted

Fastest implementation of fft in C++?

Matlab's fft functions are all based on FFTW (this is confirmed here), so I guess the obvious choice for you should be FFTW. FFTW is hardware-independent but it can take advantage of some hardware-...
• 80.4k

Signal processing in Python vs C++ (band-pass filter)

Not really an answer but too long for a comment. Standard software development and debug techniques should solve this Don't use code on real data before it has passed all unit tests First write the ...
• 32.6k

How can I work on DSP using C/C++?

I come from the game development world, and I knew C/C++ programming way before I did my first signal processing program (in the context of audio filters for games), so I hope I can give you another ...
• 171

Image Gradient: Light to Dark, Dark to Light

The UINT8 type is limited to integer numbers on the range [0, 1, 2, ..., 255]. Hence negative values are clipped into 0. A solution could be wither use other types (Floating Points) or scale and ...
• 41.4k
Accepted

removal of blackman harris window results in signal higher than expected

The reason for that is that you don't normalize the DFT samples properly. Dividing by number of samples in time domain is valid only for Rectangular Window. For simple case of DFT, you should divide ...
• 10.5k

Parameters of Gaussian Kernel in the Context of Image Convolution

When dealing with Gaussian Blur in the Image Processing context the following holds: The Standard Deviation, $\sigma$, is sometimes called radius. I think this ...
• 41.4k
Accepted

Why Is Non Linear Least Squares Method from MATLAB and Alglib Gives Different Results on the Same Data?

When you solve Non Linear Least Squares problem of a non convex cost function the end solution (Which is guaranteed to be a Local Minimum) will depend on: Method of Minimization. Method Parameters. ...
• 41.4k

How can I work on DSP using C/C++?

I find it borderline misleading to even call MATLAB a programming language. –Well, it is a Turing complete language... but so is Brainfuck (BF). You can theoretically write any software in it (given ...
• 1,169
Accepted

Recommended C/C++ General Purpose DSP Libraries

Maybe a bit late, but since others might land here like me. The following are good signal processing libraries/frameworks: * https://www.gnuradio.org/ - lots of classic signal processing + ...
• 66
Accepted

Which filter for an audio equalizer

Simply put, you need a bank of passband filters. You feed your signal through each of the filters, and sum up the outputs from the filters. Designing the filters is where the fun comes in. First ...
• 2,180

Power spectrum of a pure sine problems

Since FFT treats the signal as if it is periodic you need either to apply a window function (for example hanning) on your signal or make it coherent. In the image3 ...
• 284

Find smoothed first derivative from signal with noisy slope

I think least squares is going to be the best approach, and that's not going to be that computationally expensive (I think! Please correct me if I'm wrong). The gradient can be estimated from a ...
• 22.9k

Calculating the SNR of Audio Signal (Recommended Libraries)

It is really hard to create something to estimate the SNR in all cases. Each case requires its own treatment according to model of the acquisition of the signal. For instance, if the model is AWGN ...
• 41.4k
Accepted

normalize fft produced by fftw_plan_dft_r2c_1d

Reading the manual, even though only half the data is returned, the full length FFT is calculated: So you should normalize by whatever the full length is normalized to: ...
• 22.9k

Vein extraction from this image

I would like to direct you to 3 references: C. Steger: “Extracting Curvilinear Structures: A Differential Geometric Approach”. In B. Buxton, R. Cipolla, eds., “Fourth European Conference on ...
• 5,225

Fastest implementation of fft in C++?

There's also FFTS (written in C, not C++, though), which has some impressive benchmarks: https://github.com/anthonix/ffts I compiled it under Linux, but haven't had a chance to play with it yet.
• 74

Fastest implementation of fft in C++?

I second the fftw suggestion. One of the nice features of fftw is "wisdom". That is, if you call many times the same Fourier Transform (with the same array size), you can ask fftw to look for the ...
• 181
Accepted

How to implement the imaginary part of FFT equation applied to a signal in computer/C++?

In computer programs, complex numbers are usually represented by an array, field or vector containing two values: one value represents the real part, the other represents the imaginary part of the ...
• 4,051
Accepted

NORM_HAMMING2 vs NORM_HAMMING

From BFMatcher constructor documentation: NORM_HAMMING should be used with ORB, BRISK and BRIEF, ...
• 1,742

How can i measure soundcard latency?

Here are some approaches to consider: FMCW: Transmit a "chirp" signal where the frequency transmitted is slowly ramped from a low frequency to a high frequency (repeatably as a sawtooth or ramp ...
• 37.7k
Accepted

What exactly is "sparse representation"?

Take a sine-like signal $s$. In the appropriate Fourier $\mathcal{F}$ domain, it is represented by two "peaks", the other coefficients being zero. Fourier is a sparse representation for sines or close-...
• 30.3k
Accepted

DSP using audio IO from PC using C++

The best performance you will be able to squeeze out of a PC is with an audio interface that supports ASIO. To be able to get near 10ms of total delay (input and output) you will also need a very ...
• 10.1k
Accepted

What did I do wrong with this simple filter build?

Your analog transfer function looks OK. For the sake of clarity - and to reduce the chance of making errors - I'd just rewrite it as $$H_a(s)=G\cdot\frac{s^2+as + b}{s^2+cs + d}\tag{1}$$ with \...
• 80.4k

Sampling a low-frequency sound doesn't work at some sampling rates

Could be a few things You may be borderline clipping. Your sine wave has an amplitude of 1, which is just at the edge of clipping (depending on how its rendered). Try it with an amplitude of 0.5 Your ...
• 32.6k

How can I work on DSP using C/C++?

First of all, as others mentionned you should learn about embedded programming, real-time programming and C/C++ That being said, there are ways to minimize the Matlab to C/C++ conversion. First method,...
• 3,620