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 ...

learn more… | top users | synonyms

0
votes
0answers
11 views

How to find quantitative amount of noise in signal using python?

How to find the amount of noise in signal/polyline using python? I would like to have function which could give the output the amount of noise. For example, noise level of polyline on first picture ...
0
votes
0answers
15 views

Support Vector Machine is unable to recognize the digits in images properly

I am training a SVM on MNIST Handwritten digits database to make a basic digit recognizer. It is able to recognize digits easily on some standard images I took from a source. I then captured an image ...
0
votes
0answers
14 views

Find Translation, Rotation and Scale Values from Parameters of Homography Matrix

Assume that we have a homography matrix. The homography matrix looks like: I want to use homography matrix parameters for robot odometry like this paper. Bu I couldn't determine translation ...
5
votes
2answers
82 views

Filtering a digital signal online in real-time using python

I am currently trying to apply a bandpass filter to a signal in real-time. There are samples coming in with a constant sampling rate and i would like to calculate the corresponding bandpass filtered ...
0
votes
0answers
5 views

How can I use a trained model to generate related images?

Suppose I have a data set of a large number of related images and I extract HOG features and train it using SVM Classifier or KNN Classifier. How can I use this model to generate a new image which is ...
0
votes
0answers
11 views

Image rotation - bilinear interpolation method

I am trying to rotate an image but I am getting unsuccessful results. I realise I can just use rotate functions in packages but I am trying to do this in a particular way so I can understand what is ...
0
votes
0answers
13 views

Improve coverage of BackgroundSubtractorMOG2 and findContours

I'm trying to track players on a soccer field, using a fixed camera. The picture below shows the results of BackgroundSubtractorMOG2, the second picture below the results of findContours on the ...
1
vote
2answers
40 views

Additive synthesis vs. “just draw the waveform”

I've been experimenting with PYO recently, a Python module for sound synthesis and audio processing. This is really my first foray into this topic, so I have what is probably a very basic question. ...
0
votes
0answers
33 views
+50

Gaussian filter of 2d image with location dependant sigma in Python

I am trying to implement in Python a Gaussian filter in which the kernel is $$ G(x,y) = \frac{1}{2 \pi \sigma_0^2} e^{-\frac{(x-x')^2 + (y-y')^2}{2 (\sigma_0 f(x',y'))^2}},$$ where $f(x,y)$ is some ...
0
votes
0answers
50 views

FSK Demodulation in Python

I'm trying to demodulate an FSK audio file. The data are from geospatially encoded media where NMEA GPS strings were encoded to audio with 4800 baud and embedded in video. My goal is to use Python to ...
0
votes
1answer
19 views

Artificial Neural Network Preprocessing in Real-Time Applications

I've come across an issue with my ANN when attempting to port my offline analysis to an online, real-time, application. I currently train my algorithm using an array of input data, number of ...
0
votes
0answers
34 views

How to find the largest empty rectangle using OpenCV?

I need to find the coordinates of the largest empty rectangle in a PNG image. The rectangle should consist of light colors (if that is too difficult, white pixels only are fine) and should be ...
0
votes
1answer
31 views

Why do I have to divide by $\pi$ in order to scale amplitude of sine frequency spectrum?

Recently I found my old code to transform sine wave from time domain to frequency domain. Below I post simplified version of it. ...
1
vote
1answer
65 views

Python - Normalized cross-correlation to measure similarites in 2 images

I'm trying to measure per-pixel similarities in two images (same array shape and type) using Python. In many scientific papers (like this one), normalized cross-correlation is used. Here's an image ...
3
votes
1answer
22 views

How to merge transitions?

I need to represent my signal as a set of transitions from one level to another, and I am interested in transitions that have relatively big amplitude 2000+. I applied median filter to get rid of the ...
3
votes
1answer
33 views

STFT Window Size is 2048, Why is the output 1025?

I feel like I am having a brainfart over here and can't seem to remember what's going on with STFT outputs. Consider these two lines of code from the Python library Librosa: ...
1
vote
1answer
37 views

Sampling rate conversion for audio using ffmpegwrapper in python

I have many audio files @ 22kHz. I want to convert it to 44.1kHz. Since I have many files to convert, I am looking for an easy solution. I came across ffmpegwrapper for python. I installed the package ...
0
votes
1answer
43 views

Find reappearing pattern in the signal

I am working with a signal that describes energy consumption in some house as a function of time and I am trying to find time intervals that correspond to some particular type of dish washer. What do ...
0
votes
3answers
425 views

Why is convolution or FFT breaking in this case?

It is well-known that convolution in real space corresponds to multiplication in the reciprocal space. Yet, I obtain different results using both methods in the case that I'm going to present. I am ...
0
votes
1answer
51 views

Get phase information from bursty time series with amplitude variability and sharp edges

I have time series like this one, and I am trying to get the phase information from it. If it matters why, because I need to compute the precision of the cycles and amplitude variability is ...
2
votes
1answer
74 views

How to filter almost periodic noise?

I have signal that looks like this: As you can see there are some almost periodic pulses at the background with amplitude about 1000. I am saying almost, because, if you zoom in, you may see that ...
0
votes
2answers
159 views

High-pass filtering pre-processing before computing audio features

I want to compute acoustic features on a set of audio files. These features can be classical audio features as spectral flux, but also acoustic indices as proposed in the seewave R package ). I ...
0
votes
0answers
14 views

Welch's method equivalence between R (oce) and Python (scipy)

I try to port a code from R to python but I can't obtain the same result when applying the Welch method. This is the R code with the oce package: ...
1
vote
0answers
21 views

Emulate signal loss of a pixellated detector in Python?

I have a matrix 64x64 where each cell represents the pixel of a pixellated detector. The spacial response of this detector decreases by going further from its center (that is, coordinates "31,31" or ...
1
vote
0answers
67 views

Doing analysis using IQ demodulation in Python

I'm trying to doing an analysis using IQ demodulation. I'm doing this by taking a noisy signal which has a desired signal in it. The desired signal has a frequency that is almost stable, which I'm ...
0
votes
1answer
68 views

Calculating RMS/Crest Factor for a Stereo Signal

I'm doing some MIR related work with stereo audio and am a little unsure on how to proceed with some basic tasks. All my academic work prior to this has involved forcing audio to "mono" to perform ...
0
votes
0answers
51 views

What are best practices to compute an audio spectrogram?

The spectrogram if generally defined with the squared magnitude of the fft. However, in lots of implementation, it seems that people just use the magnitude without square. Moreover an audio signal is ...
0
votes
0answers
12 views

Filter periodic waveform with scipy.signal

I have the following filter: def filter_(Xn): Yn = signal.lfilter( Bs, As, Xn ) return Yn My source signal is a periodic waveform the fundamental period ...
0
votes
0answers
26 views

Implementation of HMM with continuous emission

I have a classification problem that, based on continuous features from a 1D signal, should classify to a finite amount of stages (discrete). There is a temporal evolution in the signal, so I am ...
0
votes
0answers
17 views

Recovering spectrum from vowel-sounds

I have this working: https://gist.github.com/p-i-/6e5ab73820b6368a331a The output looks like this: The basic algorithm is as follows: ...
0
votes
1answer
346 views

How to verify if two images have the same object/content?

I am truly new to computer vision field, but it is fascinating me! I have now a challenge in my hands and I am seeking for mentors/advisers to give me some follow up. My project is: From a picture of ...
0
votes
0answers
27 views

sklearn - two gaussians fit

I have some data here : http://pastebin.com/q3ncX6yM, the histogram of which I am trying to fit with two gaussians following ...
3
votes
1answer
244 views

python scipy fft on numpy hanning window smears peaks

I have a signal that I have acquired from an experimental instrument, that I wish to examine in the frequency domain. I don't care about phase for this exercise, I only care about magnitude. I ...
0
votes
0answers
57 views

Short VHF pulse detection from SDR

I need to detect a short (10ms) VHF pulse that occurs every 1.5s at a specific frequency (e.g., 150.20 MHz). I have an SDR that support IQ sample rates up to 10MSPS but due to computing constraints ...
0
votes
1answer
132 views

Phase measurement

I have a problem with phase measuring. I'm acquiring two signal with a USRP (complex signals) with a coherent generator and I want to measure the phase different between them.. One is at 150Mhz and ...
0
votes
0answers
61 views

Head pose estimation

I am looking for an efficient head pose estimation algorithm from facial features. What I already have: I already have implemented the code for stable facial landmarks(68 landmarks on the face). I ...
0
votes
0answers
50 views

Image processing: High pass filter to remove lowest 16 frequencies

How can I remove the lowest n frequencies of an image? Are the lower frequencies around the centre of the FFT result?
1
vote
1answer
68 views

Numpy's real fft (rfft) - losing power

Related to another problem I'm having, I was looking into the workings of numpy's rfft2 and ...
0
votes
1answer
33 views

Converting blobs to circles

I have this binary image with some blobs of random sizes. I would like to convert the blobs into circles of uniform diameter. it doesn't really matter what diameter but they need to be circles and ...
1
vote
2answers
247 views

MFCC coefficients

I have read this, this, this, this and this as a reference for computing the MFCC for a given wave file. Although, I am sure the values look wrong. In short I followed the procedure in link 5. ...
1
vote
1answer
26 views

filter long data streams with python

I am generating a time-stream data set that needs to be filtered. The data-set is pretty large (i.e. too large to be filtered in one go). I'm trying to split the filtering operation up into chunks ...
2
votes
0answers
45 views

Classify areas of an image based on color

I have some tree canopy images that I would like to process, but not sure how to get started as image processing is a little outside my area of expertise. Any help would be appreciated. I have tree ...
0
votes
0answers
34 views

Find horizontal and vertical derivatives of image

I need to find the horizontal and vertical derivatives of an image using the kernels [ 1 0 -1] and its transpose respectively, using Python. I am a newbie in Python, and don't seem to find any inbuilt ...
0
votes
0answers
59 views

Homography and RANSAC for finding robot position

I have a robotics project. Each robot has accelerometer, gyro, compass and a camera which looking through forward. I have to calculate position of robots with onboard sensors actually by camera. Can ...
0
votes
1answer
146 views

Deconvolution in Python in 2D

Referring to this topic, I am interested in a deconvolution using Python. However, unlike the linked topic above, I want to deconvolve a 2D image. The scipy.signal.deconvolve function unfortunately ...
1
vote
0answers
38 views

Python: write .wav to chosen directory [closed]

I can only write .wav files to the current directory fname = 'bassswoon.wav' wav = wave.open(fname,'w') wav.writeframes(struct.pack('h', bassswoon)) wav.close() ...
1
vote
1answer
210 views

Unexpected results for fourier resampling (Python 3)

I am trying to resample a signal using the fourier method in python using np.fft.rfft() and np.fft.irfft(). (I'm not using ...
3
votes
1answer
79 views

Optimal windowing strategy for filtering live signal

I have a stream of 250 samples per second arriving at a pipeline stage which looks something like this simplified example. ...
0
votes
2answers
65 views

Nyquist Frquency isn't what it is supposed to be

I am new here and also am not very knowledgeable about DSP so this might be dumb and easy. I am aware of the fact that in order to reconstruct a signal, I need to sample it at a frequency that is more ...
0
votes
0answers
111 views

Plotting Discrete Wavelet Transform in Python

I'm using Pywavelets to perform a discrete wavelet transform on a signal, which returns the approximation and detail coefficients as a list of float64 1d arrays with increasing size. I was wondering ...