Stack Exchange Network

Stack Exchange network consists of 175 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

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.

-1
votes
0answers
11 views

Calculate image brightness with python

for a project. How to code by inputting an image in python and calculate the image brightness?
0
votes
0answers
34 views

Audio/speech detection, verification

I would like to write a program to compare two '.wav' files, one of which is the original played file with human speech and the other is a recorded '.wav' file. The program I wish to write in python ...
0
votes
0answers
12 views

fitting lines based on image content with python

I trained an algorithm for road semantic segmentation that gives an output like this: I want to retrieve the coordinates of the vanishing point (the top of the triangle) and to fit two lines ...
0
votes
0answers
47 views

Time-frequency and time-amplitude audio analysis - Python [on hold]

I've been wondering for quite a while about how to get a 2d array in which the key indicates the time and the value indicates the frequency (or sum of all frequencies) of the audio at that time in an ...
0
votes
0answers
20 views

problem in selecting correct algorithm for project (RCNN)

I am doing a deep learning project in which i have to identify different models of cars. i am a bit confused for the following reason: first is what algorithm should I use. I have studied that RCNNs ...
0
votes
0answers
50 views

tensor flow is slow on gpu

I'm trying to do people detection using tensorflow. Here is a video of what I came up for https://youtu.be/93XOujVi-1U My questions. I run the tensorflow on GPU 1050ti nvidia, and it's extremly ...
1
vote
1answer
78 views

How can I improve my fit of cosines to periodic data using Python?

I have a space-separated csv file containing a measurement. First column is the time of measurement, second column is the corresponding measured value, third column ...
0
votes
0answers
20 views

Artifacts observed in STFTs computed with C++ library FFTW3 or NE10

In one of my projects, I have to compute stfts with audio signals coming either from a microphone or a .wav file in a C++ based program. However, I am observing different artifacts due to my stft ...
1
vote
0answers
42 views

audio sound localization using machine learning [closed]

I'm trying to localize a sound by using an array of microphones, the localization is done based on the sum and delay algorithm. I'm trying to to do the same in machine learning. I don't have much ...
0
votes
0answers
21 views

Convolution in the Hartley Domain

The convolution Theorem of the Hartley Transform is given by $$ Y_{Ha}(k) = X_{Ha}(k)H_{Ha}^{e}(k) + X_{Ha}(-k)H_{Ha}^{o}(k) $$ where, $$ H_{Ha}^{e}(k) = \frac{H_{Ha}(k) + H_{Ha}(-k)}{2} $$ $$ H_{...
0
votes
0answers
13 views

Scipy Welch's gives different first element

I've re-implemented Welch's method and want to compare it to scipy.signal.welch. However, the first two and last elements of the resulting array are different. My ...
1
vote
0answers
29 views

Generate time domain signal from frequency domain filter

I am familiar with using the Fourier transform to take a signal from the time domain to the frequency domain. What I would like to do is the reverse: describe a signal in the frequency domain and then ...
0
votes
0answers
23 views

Detection of Video Quality Using Python

I am getting started with image/video processing. As a start I have a dataset for which the goal is to detect the quality as the video progresses. Based on my readings I think any video under test ...
0
votes
0answers
50 views

Sampling Frequency, Fast Fourier Transform and some strange results in python

So, I have 2 types of signals - Dirac: $\left[ 1,0,0,0,0..NumberOfSamples \right]$ and Gauss (it's sinus * window_gausian). I need to do some operation in ...
2
votes
2answers
94 views

Why does a higher sampling frequency mess up my bandpass filter?

I was designing a bandpass filter in python using some of the scipy.signal modules. I am plotting the frequency response of my filter to verify that my desired frequency is in the passband. However, ...
-1
votes
0answers
22 views

Why is root square coherence seldom used?

Why most common programming languages used for signal processing (eg Matlab, python) don't have a "root square coherence" function, but only the magnitude squared one? I'm working on a MIMO problem ...
1
vote
0answers
38 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 ...
2
votes
1answer
72 views

Comparing multiple signals for similarity

I have multiple (between 2 and 100) signals and need to determine when a significant number diverge from the rest. We're exploring machine learning techniques, but we also want tackle this as a signal ...
0
votes
0answers
27 views

Multifractal analysis of an image using wavelets

I want to measure the fractal character of images using a wavelet approach (if possible) in python. (E.g., maybe things like roughness, anisotropy, or just the fractal dimension - perhaps just ...
0
votes
0answers
20 views

python: how to compute the color distribution of image in the paper with python and openCV

I am computing the color distribution of image as mentioned in the paper: https://arxiv.org/pdf/1202.2158.pdf. ...
0
votes
1answer
59 views

python: how to compute the sharpness features of image

I am extracting the sharpness features of image as shown in the following image mentioned in a paper. I have done with the following code. Firstly, use the open cv convert the RGB to HSL (luminance ...
0
votes
1answer
32 views

python: how to compute the gray level histogram features as mentioned in the paper, and

Hi I am extracting the grey level features of image mentioned in this paper (part 4.5 low level features). "We describe two low level features that are particu- larly important for photo quality ...
0
votes
0answers
44 views

Why convolution in time and frequency domain are not equal?

I was writing this Jupyter Notebook. Then, I unexpectedly faced two visually similar output, but their numerical results were very different. This is the code I used for convolution in the time ...
1
vote
2answers
194 views

Extending Goertzel algorithm to 24 kHz, 32 kHz and 48 kHz

I'm learning to implement Goertzel's algorithm to detect DTMF tones from recorded wave files. I got one implemented in python from here. It supports audio sampled at 8 kHz and 16 kHz. I would like to ...
0
votes
1answer
36 views

Will noise cancellation with playstation eye improve my spectral analysis?

Im doing some beginners spectral analysis for a homemade reactive RGB LED project and was thinking of ways to improve the accuracy of the audio analysis. Im using a Playstation eye with a Raspberry Pi ...
0
votes
1answer
59 views

What's wrong with my implementation of the Matching Pursuit algorithm?

I have recently attempted to implement a simple version of the Matching Pursuit algorithm, following the description detailed on Wikipedia. Although the algorithm itself seems dead simple, my ...
0
votes
1answer
30 views

Confused about Fourier transform output

I am new to signal processing, so I did a fourier transform on a frame of 200 samples with NFFT = 512 and then I took the absolute value : I am trying to understand these values on the output, are ...
0
votes
2answers
75 views

Comparing FFT for increasing time intervals in a signal

Assume a dataset where the rows represent signals: each signal $s$ is sampled at a sampling rate $f_s$ and available as an array of common length $T$. For an increasing sequence of integer times $t_i &...
0
votes
1answer
74 views

How can I modify a sound signal based on it's MFCC

I'm working on an NN algorithm with which I want to filter noise from sound signals. I have some clean speech sound samples and noise samples, by combining them I get the signal that I want to filter....
0
votes
1answer
54 views

Unit Step Response of an Integrator

Desinging a very basic 1st order integrator with the continous transfer function: $H(s) = -1 / (0.001 s)$ [No zeros, one pole at origin] I was expecting the unit step response to be positive-slope. ...
1
vote
0answers
86 views

How to envelope a non periodic Impulse signal?

I want to analyse a trc oscilloscope file, find impulses and envelope them. In the end I want to plot the envelope. data file (trc): https://ufile.io/z4m4d Code: (Python) ...
1
vote
1answer
60 views

Extreme quantization of audio

I would like to take an audio sample and reduce it to a very limited set of numbers, with one value for amplitude and another for length. Example: I want to find the dimensions of the red boxes, ...
2
votes
1answer
120 views

Calculating the first derivative of an image using DFT

I need to calculate the first derivative of a greyscale image (a 2D array) using a DFT function I built (which works). Unfortunately, the results don't seem to be correct. In the fourier domain, the ...
0
votes
1answer
368 views

Fourier Transform of ECG signal in Python

I have an ECG signal which I am analyzing using Python, as opposed to the mainstream MATLAB. So, I have digital form ECG in .dat file with .hea (header file). Below is the Fourier transform The ...
-1
votes
1answer
31 views

“Side Lobes” When Using a Butterworth filter

So I am attempting to filter a signal containing frequencies at 7Hz, 11Hz, and 74Hz. The signal lasts for 30s and looks like this between -1s and 1s: Using a butterworth filter of order 2 with lowcut=...
0
votes
1answer
424 views

Write a 440 Hz Sine Wave to .wav-File using Python and SciPy [closed]

This is my first post on DSP.SE! I'm a student in Computer Sciences and am just getting started with Signals and Systems, thus getting in touch with discrete signals and analyzing them. I wanted to ...
4
votes
2answers
67 views

references for techniques to reduce recursive filter startup transients

I am trying to track down references (published articles or reports ideally) that establish the basis for some of the techniques being used to minimize the effect of recursive digital filter startup ...
1
vote
0answers
39 views

Frequency bins too powerful at the start and at the end of each sample computed DFT data

I've taken the following link http://coding-geek.com/how-shazam-works/#comments as a project to start practising and learning signal processing and python programming for me to get started in speech ...
1
vote
1answer
113 views

Red Blood Cell Color Image Segmentation

I want to segment this Red Blood Cell Image on HSI color space.I want to try the Otsu Method but from what I read that method work only on Grayscale image.Do you have any suggestion for suitable image ...
0
votes
2answers
63 views

Shifting signal smaller than discrete step

I have a image that I need to shift with less than a pixel. My plan was to do a Fourier transform and multiply the signal with $e^{-aiu-biv}$ where $a, b$ are the shifts in x and y direction. This ...
0
votes
1answer
79 views

Resampling from variable to fixed-rate [closed]

I have a gyroscope which reports x,y,z values to my embedded device. The rate that one sample appears is variable and has a jitter of around 10ms. However I later want to have a log file with a fixed ...
1
vote
1answer
173 views

Sound Source Location

I have four microphones which I want to use to locate the direction of an audio source. Is there any Python module that implements an algorithm that, given the recordings of the four microphones, will ...
1
vote
2answers
82 views

Why is my DFT/FFT always 90° out of phase?

I'm doing an FFT using Python and Numpy on one machine, and C# on another. I'm using some dummy data that mimics how I'll eventually be gathering data from sensors in the C#/UWP application. The two ...
1
vote
1answer
102 views

Finding audio “tics” in stereo wav files using python

I have thousands of audio files that I want to "batch" process searching for audio tics. This is easily done using a DAW but that requires opening each file independently, searching for the tic (...
1
vote
0answers
156 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 ...
1
vote
2answers
89 views

Simple way to determine square-ness of signal?

Not entirely sure if my term is correct. Feel free to edit title. I have a lot of time series, where the data quality is determined by how linear each sub-sequence is. It doesn't matter if it jumps ...
1
vote
1answer
290 views

How to remove ECG artifacts from EMG data?

I'm new to signal processing and try to analyze EMG data from pectoralis major and other respiratory muscles. Unfortunately, there are strong ECG artifacts in all recordings and I don't know how to ...
0
votes
1answer
44 views

Time-domain LPF not showing expected behavior

I am trying to implement a simple first-order Butterworth Low-Pass filter in Python. I have some code that makes use of scipy.signal.butter and scipy.signal.filtfilt. It works fine, but I wanted to ...
2
votes
2answers
52 views

How do MATLAB and/or Python treat $2^n$ samples rule in FFT

As far as I have read, an FFT requires that the number of original data points must be a power of 2. I'm wondering whether the tools like MATLAB or Python which have FFT functions take care of this ...
3
votes
1answer
3k views

Removing noisy lines from image - opencv - python

I want to process different type of image to extract actual text from noisy image .I am using open cv to do this job it is working fine but the problem is I need to set different lower threshold to ...