# Questions tagged [python]

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 packages often used for SP computations.

262 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1k views

### Issues with the smoothing operator in coherence estimation using the complex Morlet (Gabor) wavelet

The goal I wish to compute the coherence estimate using the continuous wavelet transform (CWT) of a real-valued signal with the complex Morlet (a.k.a. Gabor) wavelet. I compute the cwt of the signal ...
6k views

### Demodulating FSK audio in Python

I am trying to write a Python script that can demodulate an FSK modulated audio file and return the data encoded in the audio. The data being transmitted is GPS NMEA strings which are embedded as the ...
2k views

### How can we know the geometry of a blob detected by OpenCV

I am performing blob analysis using connectedComponentsWithStats, which returns elementary statistics about the blobs (AABB and area). It is also possible to ...
3k views

### Plotting a scalogram of a signal's Continuous Wavelet Transform (CWT) in python

So I've been learning about wavelets for a few weeks because I'd like to use them in a research project I'm working on and I've been trying to grasp the general ideas behind them.I've been struggling ...
62 views

252 views

### Extract approximation and detail coefficients

I am a student and would like to know how to extract the approximation and detail coefficients (A5, D5, D4, D3, D2 and D1) after an applied DWT decomposition dB5 (Daubechies 5, level = 5)?
731 views

### Basics of Normalizing Cross-Correlation with a View to Comparing Signals

I'm trying to understand how cross-correlation is used determine the similarity of two signals. This tutorial offers a very clear explanation of the basics, but I still don't understand how to use ...
605 views

### real refractive index from Kramers Kronig relation

I have a measurement of the complex part of the refractive index $k$ (where the refractive index is $m = n + i\,k$) measured at a nonlinear grid of wavelengths or frequencies that span several orders ...
216 views

### Skewed rectified aerial images

I have a series of aerial images from which I would like to get disparity maps for every consequent pair. In order to do that I do a stereo rectification. The problem is that sometimes rectified ...
705 views

### Executing a command based on a Short-Time Fourier Transform Output

I am currently calculating a Short-Time Fourier Transform (STFT) in Python using scipy.signal.stft. I am producing the image of the STFT shown below in real-time, ...
2k views

### 3D image segmentation

Re-written more specific question For the details of my segmentation algorithm, see the original question below. I have managed to improve the segmentation considerably by using a different strategy ...
301 views

### stones' detection in jewel image

The project I am doing is to detect stones in an image of a jewel, so as to get the idea of the deduction to be made in the gross weight of the jewel. I have done image-segmentation in the HSV color ...
1k views

### Are there any signal processing libraries that implement TD-PSOLA?

For such a popular and old algorithm, I've had surprisingly little luck finding implementations. I've got it working in MATLAB, but am curious if any other languages have libraries containing it (...
2k views

### Windowed Sinc filter in python

I designed a 1st order Delta Sigma converter in PSpice, except for the decimation filter. I want to implement said decimation filter in Python, rather than in PSpice. Being new to both Python and ...
83 views

### Is there a way to extract the difference between the 2 signals? Fitting?

I'm very new to signal processing and have been struggling this far. I have a device that measures the signal due to the magnetization of iron particles. In order to calculate the response of the ...
1k views

### Blind deconvolution implementation, Python, Shalvi-Weinstein

I'd like a 1D blind deconvolution implementation in Python. I read Shalvi and Weinstein 1990 (on the recommendation of Yair Weiss) and it appears relatively simple. However I can't find an existing ...
1k views

### Yule-Walker PSD Estimate of an AR Process

I am trying to implement a Yule-Walker PSD estimation in Python but my results are not up to the expectations. In MATLAB, I would normally implement my functionality as follows: ...
796 views

### How to remove a common noise signal from a set of signals?

I have 2D measurement results which seem to have a constant non-trivial background as shown here: For every column in this image, there seems to be a similar oscillation. I'd like to distinguish this ...
92 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 ...
122 views

### How many different filters are needed for in an iterated filter bank?

I'm trying to implement an iterated filter bank as described in the Subband coding chapter of the Really Friendly Guide to Wavelets. However, the text seems to suggest that The advantage of this ...
655 views

### How do I interpolate between bins on an FFT in python?

I have four frequency peaks, which I have after applying FFT. Now I want to know precise values of these frequency peaks. there are different interpolation methods. How can I use this method of ...
694 views

### (python+opencv) haar cascade training using cloud computing

I will train my own cascade, using python and opencv. I want it to be as precise as possible, so as I read it is common that training takes one or two weeks to compile. I want to use cloud computing ...
917 views

### Extracting the phase of a jittering sine wave using python

The background: I conducted an experiment where I rotated an object (with three-fold symmetry) many times and recorded the projection of the object. I should be able to tomographically reconstruct ...
2k views

### How can I specify the scale parameter of the wavelet in PyWavelets (pywt)?

When computing wavelet transforms with PyWavelets (Discrete Wavelet Transform in Python), e.g. ...
956 views

### Lowpass then Inverse filtering in python

I wrote a simple lowpass filter in python to run against lena. Now I'd like to add Gaussian noise to the lowpass filtered data and then run an inverse filter against the lowpass and try to get the ...
554 views

### Shifting of Shift-Invariant Wavelet Transforms

Main Question: Why would iterative wavelet/inverse-wavelet transforms cause a shift along the x-axis for undecimated (shift-invariant) wavelet transforms? I am attempting to remove backgrounds from ...
2k views

### Ricean Multipath channel model implementation

I'm trying to implement a multipath ricean channel model. I had found several resources but I'm kind of lost with too much information. What I have from now is the following step: ...
206 views

### There are other shape properties scale-rotation invariant except HuMoment?

There are other shape properties scale-rotation invariant except HuMoment? There are example that show me how can i implement them? I find this example in c++ https://stackoverflow.com/questions/...
62 views

### MUSIC algorithm for DOA with floating point input signals

I am writing a Direction of Arrival (DOA) estimator using the MUSIC algorithm in python and am having trouble getting the correct spectrogram output. Specifically, my resulting graph comes out aliased ...
47 views

### Plot Spectrogram and FFT plots from samples collected by Atheros AR9271

I'm entering the world of signal processing, and as one of my first projects I've decided to plot a spectrogram and FFT Plot. The samples comes from an Atheros AR9271. More details can be found here: ...
30 views

### Map time/scene differences between two similar videos

Goal: Given two videos that are episodes from series but in different format (one Bluray/one TV for example), map the time differences between the two (which scenes are not in one of the two) and be ...
22 views

### Red Color selection in Python and Skimage

I'm trying to load an image from the disk and then to extract just the red channel of it and display it in grayscale with grey colormap but I don't know what I'm doing wrong.. The image should be ...
39 views

### How to reprocess SDR data to be equal to that captured with a higher RBW

I have a data set that consists of max hold frequency vs intensity data from an SDR at a specific RBW. I want to reprocess the data as if I sampled it with the larger resolution bandwidth so I can ...
15 views

### What is the order of the output of HoughCircles in OpenCV, when having several circles on a frame?

So I am trying to use stereo vision to calculate the depth of several red balls. With the function HoughCircles, I get an output at one frame from one of the cameras like for example: ...
85 views

### Implementation of Cepstrum in Python

Actually I want to denoise a signal. I know how can I implement FFT in python to denoise it. This is the implementation which I use(From this Kaggle notebook): But I don't know : How can I use ...
57 views

### My 3x3 Weighted Median Filter doesn't seem to be improving my image quality

In order to reduce noise in my training dataset,I attempted a WMF whose weights are shown in a 2-D array as follows(values finally get normalized by division by 15: ...
21 views

### Is my implementation of Generlized Pencil-of-Function correct?

I have a time-series data that should be of the form $$f(t) = \sum_nA_n(e^{\alpha_n t}+e^{-\alpha_n(T-t)});\;\alpha_n=\eta_n+i\omega_n;\;i=\sqrt{-1}$$ and I want to find parameters $A_n$, $\eta_n$, ...
140 views

### Is rotation of a Fourier transform the same thing as Fourier transform of a rotation?

I'm working on an image processing problem and wondering if DFT(rotation(image)) == rotation(DFT(image)) (1). My final goal is to apply rotations in the Fourier domain then do an inverse Fourier ...