Questions tagged [signal-processing]

AKA digital signal processing (DSP). A signal is an information-carrying changing attribute of an entity, but in the digital sense, 'signal' refers to either received or transmitted streams/blocks of data, commonly representing real-world quantities such as audio levels, luminosity, pressure etc over time or distance. 'Processing' is the act of altering, analyzing or characterizing the data to retrieve/modify information inherent in the signal in question.

A signal is an information-carrying changing attribute of an entity, but in the digital sense, 'signal' refers to either received or transmitted streams/blocks of data, commonly representing real-world quantities such as audio levels, luminosity, pressure etc over time or distance.

These real-world quantities usually comes as analogue signals that are being sampled and quantized into a digital format, i.e. a sequence or higher-dimensional array of discrete numbers.

'Processing' is the act of altering, analyzing or characterizing the data to retrieve/modify information inherent in the signal in question.

NOTE: questions not related to the programming of signal processing implementations but the signal processing theory behind are off-topic for Stack Overflow and should be posted to the appropriate sister site, Signal Processing SE.

Common topics include:

  • digital filtering;
  • audio processing;
  • image processing;
  • sampling;
  • data compression;
  • spectral analysis;

Analysis tools commonly in practice are the Discrete Fourier Transform (DFT), especially its fast implementations (FFT); and wavelet transforms.

Common softwares used in the field include ; ; , especially with /; ///; ; and various languages.

5814 questions
27
votes
5 answers

Convolution along one axis only

I have two 2-D arrays with the same first axis dimensions. In python, I would like to convolve the two matrices along the second axis only. I would like to get C below without computing the convolution along the first axis as well. import numpy as…
Paul
  • 1,720
  • 2
  • 15
  • 20
27
votes
6 answers

find time shift between two similar waveforms

I have to compare two time-vs-voltage waveforms. Because of the peculiarity of the sources of these waveforms, one of them can be a time shifted version of the other. How can i find whether there is a time shift? and if yes, how much is it. I am…
Vishal
  • 569
  • 2
  • 5
  • 13
27
votes
6 answers

What Are High-Pass and Low-Pass Filters?

Graphics and audio editing and processing software often contain functions called "High-Pass Filter" and "Low-Pass Filter". Exactly what do these do, and what are the algorithms for implementing them?
Kristopher Johnson
  • 81,409
  • 55
  • 245
  • 302
27
votes
4 answers

scipy signal find_peaks_cwt not finding the peaks accurately?

I've got a 1-D signal in which I'm trying to find the peaks. I'm looking to find them perfectly. I'm currently doing: import scipy.signal as signal peaks = signal.find_peaks_cwt(data, np.arange(100,200)) The following is a graph with red spots…
cjm2671
  • 18,348
  • 31
  • 102
  • 161
27
votes
6 answers

Estimating small time shift between two time series

I have two time series, and i suspect that there is a time shift between them, and i want to estimate this time shift. This question has been asked before in: Find phase difference between two (inharmonic) waves and find time shift between two…
omar
  • 513
  • 2
  • 5
  • 13
26
votes
7 answers

How do you analyse the fundamental frequency of a PCM or WAV sample?

I have a sample held in a buffer from DirectX. It's a sample of a note played and captured from an instrument. How do I analyse the frequency of the sample (like a guitar tuner does)? I believe FFTs are involved, but I have no pointers to HOWTOs.
WaveyDavey
26
votes
2 answers

Data to audio and back. Modulation / demodulation with source code

I have a stream of binary data and want to convert it to raw waveform sound data, which I can send to the speakers. This is what the old-school modems did in order to transfer binary data over the phone line (producing the typical modemish sound).…
Martin Konicek
  • 39,126
  • 20
  • 90
  • 98
26
votes
6 answers

Extracting precise frequencies from FFT Bins using phase change between frames

I have been looking through this fantastic article: http://blogs.zynaptiq.com/bernsee/pitch-shifting-using-the-ft/ While being fantastic, it is extremely hard and heavy going. This material is really stretching me. I have extracted the maths from…
P i
  • 29,020
  • 36
  • 159
  • 267
26
votes
2 answers

sine calculation orders of magnitude slower than cosine

tl;dr Of the same numpy array, calculating np.cos takes 3.2 seconds, wheras np.sin runs 548 seconds (nine minutes) on Linux Mint. See this repo for full code. I've got a pulse signal (see image below) which I need to modulate onto a HF-carrier,…
Finwood
  • 3,829
  • 1
  • 19
  • 36
26
votes
3 answers

Downsample a 1D numpy array

I have a 1-d numpy array which I would like to downsample. Any of the following methods are acceptable if the downsampling raster doesn't perfectly fit the data: overlap downsample intervals convert whatever number of values remains at the end to a…
TheChymera
  • 17,004
  • 14
  • 56
  • 86
26
votes
3 answers

Generating waveform from any music file ios

I'm looking for how to draw the sound waves according to music. I want waves like this image here is some discussion about displaying Waves from music WaveForm on IOS rendering a waveform on an iphone audio waveform visualisation with…
Vishal Khatri
  • 954
  • 2
  • 12
  • 32
26
votes
2 answers

What are the downsides of convolution by FFT compared to realspace convolution?

So I am aware that a convolution by FFT has a lower computational complexity than a convolution in real space. But what are the downsides of an FFT convolution? Does the kernel size always have to match the image size, or are there functions that…
ABDreverhaven
  • 539
  • 1
  • 5
  • 10
26
votes
2 answers

How to apply a low-pass or high-pass filter to an array in Matlab?

Is there an easy way to apply a low-pass or high-pass filter to an array in MATLAB? I'm a bit overwhelmed by MATLAB's power (or the complexity of mathematics?) and need an easy function or some guidance as I couldn't figure it out from the…
Christian
  • 1,027
  • 1
  • 13
  • 26
26
votes
2 answers

How To apply a filter to a signal in python

is there any prepared function in python to apply a filter (for example Butterworth filter) to a given signal? I looking for such a function in 'scipy.signal' but I haven't find any useful functions more than filter design ones. actually I want this…
Navid Khairdast
  • 367
  • 1
  • 3
  • 6
25
votes
2 answers

Looking for a good C/C++ wavelet library for signal processing

Does anyone know of a good C/C++ wavelet library for signal processing? The signal is float or double valued, not int valued.
user334911