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.

Filter by
Sorted by
Tagged with
2
votes
0answers
26 views

Friendliest python library for fixed point algorithm simulation

My primary programming language is python. Is anyone aware of solid python libraries to simulate fixed point algorithms in python? A quick google search revealed this: https://pypi.org/project/...
0
votes
1answer
12 views

How to extract the Freezing Index from Accelerometer data?

I'm working on a project to detect Freezing of Gait episodes for Parkinson's Disease patients, and according to this paper and other ones, extracting the freezing index which is "The power in the “...
1
vote
0answers
16 views

Noise level estimation using Hildebrand & Sekhon method

I have some data from a radar to process in order to find the moments and in turn the wind speeds. I have no prior knowledge in signal processing so it's giving me a hard time to estimate the noise ...
0
votes
0answers
12 views

Smoothing jagged lines in an image?

I have an image like this - I would like to smoothen the lines in this (as you can see they lines are a little jaggy.) How can I do this? I obtained the lines by isolating them from another image ...
0
votes
0answers
5 views

how to use robot framework to launch unit tests on matlab?

I Know the syntax of rfw and and I want to make some unit test, for some kernels and functions in matlab and I need some help to begin with
0
votes
1answer
36 views

Pitch shifting with bins creating large feedback

I am attempting to create a pitch correction algorithm. I started by performing a test. The test goes as such: Get WAV file Split it into bins of size n (512 in my case) Shift each bin by 2 semitones ...
0
votes
1answer
30 views

Construct IFFT from only the major frequencies of an input signal?

I have data which when plotted looks like the green line in the below image. The data is from the walking-motion of a reinforcement-learning-model in a simulation and therefore the values do not ...
0
votes
1answer
13 views

What does librosa.load return?

I'm new to signal processing and I'm working with librosa library quite a bit. I would like to know what is the information that is returned by librosa.load function when I read a audio(.wav) file ...
0
votes
1answer
13 views

is there any algorithm for image texture in opencv [closed]

I'd like to extract cloth's texture in real-time video using python. Is there any algorithm to implement it like entropy in skimage.
0
votes
1answer
21 views

What function to apply a Metamorphopsia (grid warp) translation?

How would I go about finding or creating a function to warp images dependent on grid lines surrounding an origin (I don't wish for a grid on my actual images): It should work in practically the same ...
1
vote
0answers
50 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 ...
0
votes
2answers
27 views

Record Signal after Threshold Reach in GNU Radio

I would like to use GNU radio to begin recording a predetermined number of complex samples to a file sink automatically as soon as a signal magnitude threshold is reached. For example, as the gnu ...
0
votes
0answers
26 views

Resampling assessment

I'm trying to figure out which of the resampling methods is best in my job. Comparing the original image vs. bilinear, bicubic, bicubic spline, lanczos. For now I have considered metrics like MSE RME ...
1
vote
0answers
45 views

Signal processing

I am quite new to signal processing and I have got the signal in picture. I'm working with Python. The central part has some sort of periodicity and it is the one I want to retain, whereas I want to ...
0
votes
0answers
15 views

Can someone help me this db transform applied on melspectogram?

I have read some audio processing codes written in Python : ...
0
votes
1answer
44 views

Upsampling implementation

I have problem with upsampling implementation in the following way: My code: ...
0
votes
0answers
28 views

Measuring Voltage Fluctuations (RMS)

I am currently working on the Hodgkin-Huxley model and would like to show that the absolute amplitude of the current fluctuations increases with the area - I thought of the RMS value as a reasonable ...
1
vote
0answers
28 views

How to take the inverse FFT of Welch's power spectral density in Python?

I have calculated the power spectral density of a weakly-stationary signal using Welch's method (as implemented by scipy.signal.welch in Python), and am looking to take the inverse Fourier transform ...
0
votes
0answers
27 views

How to calculate the plane at infinity? either in Matlab or Python

I tried to implement this function to compute the plane at infinity $n_\Pi$ from the equation: where $w^{-1}$ is the image of the absolute conic IAC, $M_j$ is the Projection Matrix of image $j$, but ...
0
votes
0answers
12 views

How to save MFCC features and frame energy of several wav files to one .npz file for machine learning training?

I am creating a English-Italian corpus of around 100 hours of English audio from LibriVox aligned with their Italian textual translation. The alignment is at a sentence level and the corpus consist of ...
0
votes
0answers
9 views

How to correctly perform Continuous Wavelet Analysis

I have a signal coming from an accelerometer which has already been filtered in the band 0.5-15Hz. I would like to understand in particular how frequencies are distributed in two bands (0.5-3, 3-6) ...
2
votes
3answers
50 views

Circuit simulator with variable simulation time step. How to obtain FFT afterwards?

I know that I am not the first one with this problem, but I didn't manage to find the proper answer, so I hope you would like to help me. From an electric circuit simulator, I simulated my circuit in ...
0
votes
1answer
17 views

Wavelets / Identifying bursty signals

I thought my network was experiencing outages. I collected bandwidth (Mbps) measurements every 30 min. A cumulative probability distribution shows the probability that bandwidth will exceed any given ...
0
votes
1answer
20 views

Upsampling in Python

I'm trying to perform upsampling in Python. Given the signal 's' and factor of upsampling N, I wrote the following code: ...
0
votes
2answers
43 views

Fast Fourier Transform showing the same results but with different files?

so I'm pretty sure that I'm plotting the wrong frequency domain against my FFT values because I keep getting basically the same graph shape every single time. I think that I just don't comprehend the ...
0
votes
1answer
27 views

What's the difference between “Magnitude Spectrum” and “FFT”?

I am particularly talking about the matplotlib's axes.magnitude_spectrum() function that plots the magnitude spectrum. Is this a representation of the discrete Fourier transform?
2
votes
2answers
2k views

FFT showing peaks at 0Hz?

so I've been attempting to do a FFT on some data and I'm seeing a peak at 0Hz, which I can't really comprehend why since I'm quite new to signal processing. I read in my file using pandas, saved them ...
0
votes
0answers
11 views

How do you apply DCT steganography on an RGB image?

I am working on a DCT-based steganography program in Python and I found a working model in Github. The program, however, can only encode on one of the RGB channels. Resulting in a discolored image. ...
0
votes
1answer
33 views

How to get the area(Pixels count) inside ring-like shape?

I have the following image, and I do like to count the pixels inside the ring to get the area. I did some morphological operations as a kind of post-processing to make the image as much as possible ...
1
vote
2answers
293 views

Understanding sine wave generation in Python with linspace

I was trying to sample a 12.8 MHz sine wave (78.125 ns) signal at every 160us (micro seconds). Since 160us is multiple of base period 78.125ns(x2048) i expected to get a sample of fixed amplitude but ...
0
votes
1answer
18 views

Typical parameters and stability of Chebyshev filters

I design Chebyshev first and second type filters using scipy.signal.iirfilter. What are typical values of maximum ripple in the passband and minimum attenuation in the stopband? I struggle to find ...
1
vote
1answer
25 views

IFFT and sample count issue in OFDM

I wrote a python program to generate OFDM packets (i.e. the IQ samples) with a custom payload to, for example, be transmitted via an SDR. After mapping the chunk of bits corresponding to one ofdm ...
0
votes
0answers
17 views

How to optimize padding and truncating of signal

I 6000 signals that vary between 3000 and 30000 in length In the figure under you can see that most of the signals are of length 5000. So I decided to pad and truncate all signals to 10000 and feed ...
0
votes
0answers
29 views

Finding the PID values for a vehicle control system

I'm trying to design a PID system for the longitudinal control of an autonomous vehicle. I figured out about most of it but I'm trying to figure out the Kp, Ki and Kd values. This is an illustration ...
0
votes
0answers
30 views

Why is there a difference in the spectrum of an audio file between Sonic Visualizer and my Python script?

I am working on a script which is creating a spectrum analysis from an audio file using SciPy and NumPy. Before I started, I analyzed the file using Sonic Visualizer, which got me the following result:...
1
vote
0answers
20 views

Difference between these two Continuous Wavelet Transforms?

I am porting Synchrosqueezing to Python, and came across an implementation difference on CWT between mine and PyWavelets' - details below. The idea is to merge this implementation to PyWavelets if ...
0
votes
0answers
11 views

Remove unwanted portion from a signal in python

I have a signal which measures current and save it the form of 1D array. The signal follows a typical patters and I will be doing some research work on that pattern. But before the pattern appears, ...
0
votes
0answers
38 views

Maximally Stable Extremal Regions (MSER) Implementation in Document Image Character Patch Identification

My task is to identify character patches within the document image. Consider the image below: Based from the paper titled "CG-DIQA: No-reference Document Image Quality Assessment Based on ...
0
votes
0answers
21 views

Evaluate the quality of the satellite image resampling method

I'm evaluating different methods of resampling on Sentinel 2 images for switching from 20m to 10m bands. Comparing bilinear, cubic and lanzcos methods I would like to judge the best result. Several ...
0
votes
1answer
32 views

Difference between frame rate and sampling rate?

Below are the two different methods of generating time to create an audio sine wave. While framerate is being used as steps in one method, the inverse of sampling rate is being used as steps in the ...
0
votes
1answer
30 views

Creating highpass from lowpass in Python

I want to create high pass filter from low pass filter in Python. My code: ...
0
votes
1answer
28 views

audio reprocessing for machine learning

I have a bunch of phone interviews where there is large sound volume difference between two voices in some of the interview audios, because they were recorded only on one side of the phone. May I ask ...
1
vote
1answer
69 views

Reduce Jitter in Live Kalman Filter

I have a stream of data over time that I have fed into a Kalman filter. This data represents the vertical displacement in time of a vehicle's rearwheel as it travels over a bump in the road. The ...
0
votes
1answer
51 views

Implementation of Filters in Python

I've implemented 2 filters in Python I would like to know if they look OK or not.. I've implemented an lowpass FIR Hann Filter and an lowpass IIR Chebyshev type 1 filter. My plots look like the ...
2
votes
2answers
90 views

Contradictory results from power spectral densities and autocorrelation in shot noise

I have a white noise generator circuit which involves a Zener diode meant to undergo breakdown across a resistor $R1$, and am trying to compare power spectral densities and autocorrelation of the ...
1
vote
1answer
28 views

Identify if a Specific Edge Pixel Belongs to Horizontal, Vertical or Diagonal Edge Line

I have a code below that identifies the edge of the text image. Input image is: Output display is: I want to select random points near the edge border of the text. I was thinking to identify if the ...
0
votes
1answer
46 views

Can't implement correctly Python IIR and FIR Filters

I'm trying to implement 2 lowpass filters and see the difference between them from plots( one FIR filter that needs to be designed with the Hann window method and another IIR filter using Chebyshev ...
0
votes
2answers
101 views

Lowpass Hann filter in Python

I'm trying to design a FIR lowpass filter using Hann windowing in Python but I don't know where to start from... I have fc1,fc2, ft, rp and rs as parameters. This is my Python code: ...
2
votes
1answer
55 views

2D DFT in image processing in python

I try to compute 2D DFT in a greyscale image with this formula: I write the code bellow with python ...
0
votes
0answers
11 views

Question regarding the implementation of the guided random walks algorithm

I'm working on the implementation of the paper: Segmentation by retrieval with guided random walks: Application to left ventricle segmentation in MRI. I tried to modify the weights functions mentioned ...

1
2 3 4 5
15