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
15
votes
1 answer

What is the difference between scipy.signal.spectrogram and scipy.signal.stft?

The functions spicy.signal.spectrogram:https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.spectrogram.html and spicy.signal.stft:https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.stft.html seem to do a very similar…
user7468395
  • 1,299
  • 2
  • 10
  • 23
15
votes
2 answers

scipy.signal.spectrogram compared to matplotlib.pyplot.specgram

The following code generates a spectrogram using either scipy.signal.spectrogram or matplotlib.pyplot.specgram. The color contrast of the specgram function is, however, rather low. Is there a way to increase it? import numpy as np from scipy import…
15
votes
2 answers

Android 2.3 Visualizer - Trouble understanding getFft()

First time here so sorry in advance for any butchered formatting. So I am completely new to DSP so I have only a very general understanding of the Fourier Transform. I am trying to build a visualizer app for Android SDK 9, which includes a…
ebolyen
  • 956
  • 2
  • 10
  • 25
15
votes
5 answers

Android Compass orientation on unreliable (Low pass filter)

Im creating an application where i need to position a ImageView depending on the Orientation of the device. I use the values from a MagneticField and Accelerometer Sensors to calculate the device orientation with…
15
votes
2 answers

Pydub - How to change frame rate without changing playback speed

I have a couple audio files that I open in Pydub with AudioSegment. I want to decrease the audio quality from frame rate 22050 to 16000 Hz. (One channel files) If I simply change the frame rate of AudioSegment, what I get is the exact same…
Daniel Möller
  • 84,878
  • 18
  • 192
  • 214
15
votes
6 answers

How to compute frequency of data using FFT?

I want to know the frequency of data. I had a little bit idea that it can be done using FFT, but I am not sure how to do it. Once I passed the entire data to FFT, then it is giving me 2 peaks, but how can I get the frequency? Thanks a lot in…
Michael
  • 361
  • 2
  • 3
  • 9
15
votes
4 answers

Find time shift of two signals using cross correlation

I have two signals which are related to each other and have been captured by two different measurement devices simultaneously. Since the two measurements are not time synchronized there is a small time delay between them which I want to calculate.…
Rickson
  • 1,040
  • 2
  • 16
  • 40
15
votes
3 answers

Python High Pass Filter

I implemented an high pass filter in python using this code: from scipy.signal import butter, filtfilt import numpy as np def butter_highpass(cutoff, fs, order=5): nyq = 0.5 * fs normal_cutoff = cutoff / nyq b, a = butter(order,…
ChrisG
  • 333
  • 1
  • 3
  • 10
15
votes
1 answer

Can't find the right energy using scipy.signal.welch

For a given discret time signal x(t) with spacing dt (which is equal to 1/fs, fs being the sample rate), the energy is: E[x(t)] = sum(abs(x)**2.0)/fs Then I do a DFT of x(t): x_tf = np.fft.fftshift( np.fft.fft( x ) ) / ( fs * ( 2.0 * np.pi ) ** 0.5…
gravedigger
  • 359
  • 1
  • 3
  • 13
15
votes
1 answer

What is a spectrogram and how do I set its parameters?

I am trying to plot the spectrogram of my time domain signal given: N=5000; phi = (rand(1,N)-0.5)*pi; a = tan((0.5.*phi)); i = 2.*a./(1-a.^2); plot(i); spectrogram(i,100,1,100,1e3); The problem is I don't understand the parameters and what values…
benzene
  • 165
  • 1
  • 1
  • 6
15
votes
2 answers

circular cross correlation python

Is it possible to perform circular cross-/auto-correlation on 1D arrays with a numpy/scipy/matplotlib function? I have looked at numpy.correlate() and matplotlib.pyplot.xcorr (based on the numpy function), and both seem to not be able to do circular…
Lambert_W
  • 155
  • 1
  • 9
15
votes
2 answers

Audio and Signal Processing in Haskell

Do you know of alive attempts at audio synthesis / signal processing in Haskell ? Either for live performance or just for offline processing ? I am not looking for libraries relying on an external tool (like bindings to SuperCollider). I have found…
alpheccar
  • 226
  • 3
  • 7
14
votes
6 answers

Programmatically increase the pitch of an array of audio samples

Hello kind people of the audio computing world, I have an array of samples that respresent a recording. Let us say that it is 5 seconds at 44100Hz. How would I play this back at an increased pitch? And is it possible to increase and decrease the…
Eric Brotto
  • 53,471
  • 32
  • 129
  • 174
14
votes
5 answers

How to correlate two time series with gaps and different time bases?

I have two time series of 3D accelerometer data that have different time bases (clocks started at different times, with some very slight creep during the sampling time), as well as containing many gaps of different size (due to delays associated…
BobC
  • 3,320
  • 5
  • 24
  • 30
14
votes
3 answers

Time delay estimation between two audio signals

I have two audio recordings of a same signal by 2 different microphones (for example, in a WAV format), but one of them is recorded with delay, for example, several seconds. It's easy to identify such a delay visually when viewing these signals in…
GreyCat
  • 16,622
  • 18
  • 74
  • 112