Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Python is a high-level interpreted general programming language. Python has popular numerical and scientific libraries/packages, most notably numpy and scipy. The scipy.signal package is a powerful signal processing software collection. This tag covers the use of numpy, scipy, and other Python ...

0
votes
0answers
11 views

How to find the probability of Kalman filter states? [OpenCV+Python]

I am working on a video object tracking problem. I am using Kalman filter to predict and correct the object position return by an algorithm such as CamShift. I want to adjust the likelihood ...
0
votes
0answers
13 views

Half wave rectified difference in python

I'm trying to calculate a half-wave rectified difference between two audio files using librosa and then convert this output back to an audio file. I'm having difficulty figuring it out. In particular, ...
0
votes
2answers
31 views

Spectrogram from scipy.signal with Python

To test the python spectrogram (from scipy.signal) , I've created a signal with 2 harmonics: 2 Hz and 8 Hz. Then I've added 50Hz noise and a trend (https://i.imgur.com/t1SnQck.png). I wanted to ...
0
votes
0answers
9 views

How to align two images with OpenCV and python?

I have below reference image and defective image to align to find the errors of the defective image using subtraction. How can I align defective image with reference image?
0
votes
2answers
16 views

Detect gradual increase then decrease in slightly noisy data

I have data thats not too noisy and I am trying to detect a pattern where it gradually increases then decreases in a short period of time (20 ticks? it should be roughly similar per session but can ...
0
votes
1answer
32 views

How to measure acoustic pressure level under water with a hydrophone?

this is my first post here and I am also new in signal processing. Let's say I have a hydrophone with amplifier which is connected to a sound card plugged in to a computer. I gather the sounds to a ...
0
votes
0answers
10 views

What is the size of Kernel I should Keep when using Sobel filters for finding Vertical Gradient of Image?

I've trying to find the vertical gradient of OCT images of retina and extracting top 3% of images to create an image containing my point of interest ...
0
votes
1answer
51 views

Is this jumbled image due to difference between Matlab and Python slicing?

When I import an image from Matlab I get the following jumbled image rather than the (224x224x3 RGB) image of a single elephant I expected I write the image from Matlab as a binary file ...
1
vote
1answer
56 views

How to filter out those outliers

I'm struggling to filter some data from an accelerometer. I need to do it in python (and not just on the device collecting the data) to fix the data I have, so that I can build some classification ...
-1
votes
0answers
22 views

autocropping a rectangle from an image using python

I was given a set of images(large volume) from which the rectangles to be cropped. Using mask,numpy and by giving hardcoded values, the images are perfectly cropped. Here I post the code that I ...
0
votes
0answers
11 views

Python - Real-time high-pass filter (HPF) spectrum analyser is lagging [migrated]

I created a python coding that apply HPF to the input audio in real-time. It works just fine. ...
0
votes
1answer
34 views

How do I apply a binary mask and STFT to produce an audio file?

So here's the idea: you can generate a spectrogram from an audio file using shorttime Fourier transform (stft). Then some people have generated something called a "binary mask" to generate different ...
-1
votes
1answer
33 views

Spectral Subtraction python implementation error

I am trying to implement Spectral subtraction in python. I am new to DSP. I used this article as reference and below code is what I can come up with. Of course I did not get the expected output. I ...
0
votes
0answers
21 views

Backgroun noise in voltage vs time graph

I am analyzing a voltage vs time graph and I am coming across sinusoidal background noise in the cathode. I was wondering what the best method of getting rid of this noise would be on python. So far I ...
0
votes
0answers
28 views

How to add overlapping frames after processing a signal

I have to perform spectral subtraction on a signal in python. I have followed the steps specified in this link http://practicalcryptography.com/miscellaneous/machine-learning/tutorial-spectral-...
1
vote
1answer
47 views

Amplitude of frequency bin in FFT doesn't match time-domain amplitude

I have a sinusoidal current that I am sampling at about 357k SPS. The current signal is about 3A pk-pk @ 750hz (top figure). I am wondering why when I take the fft using numpy/scipy's fft function, ...
0
votes
0answers
37 views

Find the best (seamless) looping points in an audio signal

I have a mono signal x[n] sampled at 44.1 kHz (a single sustained note of an instrument) with Attack, Decay, Sustain, Release, that lasts about 10 seconds (the ...
0
votes
0answers
53 views

Python toolboxes for state-space estimation via subspace estimation

Is there (open-source) toolboxes for state-space estimation via subspace estimation in Python? I know this is used in Matlab's n4sid function, but I didn't found any Python's implementation (even in ...
0
votes
0answers
46 views

Bandpass butterworth filter in python is not working

I've implemented this bandpass filter in matlab for the audio signals and it's working as expected. Now, I tried to implement the same thing in Python but it doesn't produced expected results, it just ...
0
votes
1answer
27 views

Extract jump location in data

I would like to extract the location of data jump (see figure below), the difficulty is that the data are noisy as you can see. I try with a median filter or a other regularization and it could move ...
0
votes
0answers
30 views

Matrix cross correlation in python

I'm currently performing matrix cross correlation in python using : C = scipy.signal.correlate2d(A,A) where A is a 2D matrix, typically a picture. As you can ...
0
votes
1answer
58 views

Trouble with time-syncing two radio signals using cross-correlation

I posted a similar question a while ago here (I'm posting this follow-up since I'd like to focus more on cross-correlation now). I have a setup where I have two software-defined radios connected to ...
1
vote
1answer
33 views

Unscented Kalman Filter - Multiple Consecutive Measurement Updates

In trying to implement an Unscented Kalman Filter (UKF), I have come across the issue of what to do when my measurement signals come in at a different rate than my control inputs, which I use in the ...
1
vote
0answers
30 views

Binarization, and then thinning/skeletonization

I have pictures of networks, like the one below, and my goal is to obtain the network's skeleton from processing those images. My approach lies in two steps, first I convert grayscale image to binary ...
0
votes
1answer
40 views

reconstructing time-stretched signals for filtering purposes

I would like to know if it's possible to reconstruct the original time domain signal from it's time-stretched version? Is there any algorithm out there that can do this? Python, Matlab, etc? I want ...
0
votes
0answers
48 views

How to extract text from scene images?

I tried many methods for segmenting images like the example below ; but i obtained no efficient result can someone suggest me a good method for extracting text from complicated images like this ...
0
votes
1answer
28 views

Numerical error while implementing a periodic pulse signal

I'm trying to illustrate the principle of constructing a periodic signal using an elementary pattern. This is the code I use (python 2.7 + numpy + scipy.signal) : ...
0
votes
0answers
18 views

What means transition band in bandpass filters? [duplicate]

im no a specialist in dsp, but i would like to know what means a transition band in band-pass filters, in this statement: ...
2
votes
1answer
50 views

What's the relationship between the parameters of this noise generator and the gaussian curve it produces in the frequency domain?

This algorithm produces a sequence $y$ having a magnitude spectrum that resembles a normal distribution, peaking at frequency $\omega$: $$b[n]=(1-\sigma)b[n-1]+\frac{\sigma}{\omega} C$$ $$p[n]=p[n-1]+...
0
votes
1answer
95 views

Checking for VHF pulse with SDR and python

So I have a small NooElec Software Defined Radio and I've got it working well with my Raspberry Pi using GQRX as a controller and to visualize the SDR output. My goal though is to use a python script ...
2
votes
2answers
69 views

How can I synchronize signal from an LED and TTL pulses better?

I would like to synchronize my video and voltage data using Python. I sent $150\text{ ms}$ long TTL pulses to a computer recording the voltage data, at the same time as to an LED in the field of view ...
0
votes
0answers
10 views

How does a cross-looking error profile arise in discrete fourier transform?

I am numerically computing a 2D NxN complex Hermitian matrix using a discrete fourier transform operation on an 2D MxM complex Hermitian matrix. The phases of the output 2D NxN matrix elements are ...
0
votes
1answer
18 views

How to decompose raw acceleration signals into gravity and dynamic acceleration?

I have a data from $3$-axis $50$ Hz accelerometer, acceleration over each of $3$-axis: $acc_X,\ acc_y,\ acc_z$. I want to decompose acceleration into gravity and movement components. First ...
0
votes
1answer
51 views

How to interpret the signal in frequency domain

I'm having difficulties understanding some basics regarding FFT. I was hoping you could answer a few questions I have. These questions will probably seem silly to you, sorry for that. I'm a complete ...
0
votes
2answers
129 views

Finding Reference Audio Signal in Test Audio Signal and Cropping Accordingly

As seen in the diagram, below I have a reference audio and a test audio. I want to find at what part of the test clip the reference audio be heard. Once, that is found I want to crop the test file ...
0
votes
0answers
39 views

Virtual Audio Device Python

I'm looking to create a program where I take an audio input stream, whether it be microphone or an audio file etc. Perform some arbitrary processing to it and then output this signal to a virtual ...
0
votes
0answers
55 views

How does the Scipy implementation of CWT actually work?

I'm trying to use the SciPy implementation of the Continuous Wavelet Transform to analyze EEG data. I am using The problem is that I have no idea what the width parameter should be. It says that it's ...
0
votes
1answer
82 views

How to Apply Gaussian Filter to Raw Audio Files in Python?

I am recording raw files in python to later break them into phonemes, but the noise in the surrounding environment is hampering the result. So, there is a need to apply a filter to the recorded raw ...
-1
votes
1answer
378 views

Calculating the SNR of Audio Signal (Recommended Libraries)

Are there any open source packages or libraries available which can be useful in calculating the SNR(signal to noise ratio) of an audio signal. The input will be just an audio signal and I have to ...
0
votes
0answers
28 views

Compare twoo Arraylists that contains peaks (fingerprint) of an audio files using python

My main idea is to compare the similarity of twoo audio files,so i already did detected the peaks elements (as shown bellow) of my files -Soud A & Soud B- and put those peaks on an ArrayList -...
0
votes
0answers
14 views

Classify future changes in series-1 using local past changes in series-2

Goal: classify changes in green series using black series as predictor specifically, when value of black series increased/decreased and value of green series has not increased/decreased similar ...
2
votes
3answers
51 views

Decreasing Sample Rate in DFT (FFT) for Audio Analysis

I'm working with audio data analysis through FFT algorithm. My example audio is a sine wave at 440 Hz and 44100 Hz sampling rate. FFT methods in programming, like ...
0
votes
0answers
41 views

Understanding scipy.ndimage.filters.convolve function

So I am using scipy.ndimage.filters.convolve function. I understood how it works for 2D matrices from the documentation. But when I apply this to 3D matrices it is ...
0
votes
1answer
301 views

Apply Low pass Butterworth filter in Python

I want to use a low pass Butterworth filter on my data but on applying the filter I don't get the intended signal. Here is the dummy code: Signal A: ...
1
vote
0answers
41 views

scipy.signal.deconvolve returns an array of NaNs [closed]

I am trying to implement a deconvolution-based event detection algorithm in python, but scipy.signal.deconvolve doesn't seem to work in my case. Here is a basic example: ...
2
votes
1answer
66 views

Scale FFT frequency range for a bars graph

I'm trying to show frequency spectrum for audio data as a bars graph using FFT. If I have data for a sine wave at 440 Hz and with sampling rate 44100 Hz and analyze its first 1024 samples I get an ...
-1
votes
1answer
39 views

Slow implementation DTW for word recognition

I wrote little program for isolated word recognition using DTW algorithm. In folder with main program i have another folder "Data20dict", with 20 more folders in it, and each one is called by voice ...
0
votes
1answer
91 views

Bandstop filter

I'm trying to make a bandstop digital filter. I have used butterworth signal library to make a highpass filter, but using same technique I cannot achieve this bandstop filter. Here's an example: <...
0
votes
1answer
197 views

What are some python packages I can use to cut audio files

I have a project in which I have a batch of audio files and I need to remove the audio in it from say time 2secs to 5secs i.e. I have a set duration to be removed. How can I do this in python?
5
votes
1answer
95 views

Morphing between two FFTs

I'm a musician and I'm making a script that takes a wave file and snaps each of its frequencies from the fourier transforms to the nearest musical harmonic. Thanks to help from another question I ...