# Questions tagged [signal-processing]

AKA digital signal processing (DSP). A signal is an information-carrying wave, but in the digital sense, a 'signal' refers to either received or transmitted streams/blocks of data, commonly representing real-world quantities such as audio levels, luminosity, pressure etc over time or distance. 'Processing' is the act of altering, analyzing or characterizing the data to retrieve/modify information inherent in the signal in question.

79 questions
Filter by
Sorted by
Tagged with
48 views

### Script to check zero crossings to check if microphones phases are aligned

I have 'n' microphones placed in square fashion and I want to make sure that all the channels must be aligned in time exactly the same if the signal is equidistant from all the 'n' microphones i.e. in ...
181 views

### Peak and valley finding algorithm

I'm trying to improve my algorithm to make it faster. Also might help to have a few sets of eyes for any bugs or gaps in logic I didn't catch. One thing to note: because of the nature of the algorithm,...
135 views

### Implementing 3Blue1Brown's description of Fourier transform in Python+numpy

I have implemented the 3Blue1Brown's description of Fourier transform in Python+numpy for irregular and unsorted data, as described here. ...
114 views

### Calculating silence in a WAV file

I made this script to calculate the amount of silence in seconds in an audio file. Is this a good method to do this, and if yes, can it be improved? It takes about 4 seconds for 20 audio files of 100-...
1k views

### Peak valley detection in python

Below is a peak/valley detection algorithm I've designed. The basic premises for this function is that we split our data into chunks, do linear regressions on these chunks, detrend the data based on ...
102 views

### Expanding the region of interest of an image

I am solving a problem of increasing the ROI of a retinal image using the below algorithm- First, the set of pixels of the exterior border of the ROI is determined, i.e., pixels that are outside ...
91 views

### Basic digital RC approximation filter in python (Micropython)

I have written a simple RC Filter approximation in python that I have a feeling could be more concise. Are there any obvious improvements? ...
1k views

### Radix2 Fast Fourier Transform implemented in C++

Note: If you don't know much about Fourier transform algorithms, a simple review of whether I am doing anything inefficient with C++ in general would be appreciated. I've been working on implementing ...
490 views

### Bilinear image interpolation

I have written a bilinear interpolant, which is working moderately well except that is painfuly slow. How can rewrite the code to make it faster? Using opencv directly isn't a valid answer. ...
208 views

### Hurst Exponent calculator

I am aiming to compute the Hurst Exponent of a 1-D signal time series in Python. For now, I have one existing function hurst(sig) which returns the Hurst exponent ...
60 views

### Sampling and Reconstructing a signal in Julia

I am a newcomer to the Julia world, so I started trying to implement a very simple program: Sample a signal Reconstruct it (various ways, just rectangular for now) Plot it Everything is fine and '...
93 views

### Convolutions with shared memory in CUDA

I am writing a noise blur convolution kernel in CUDA ...
306 views

### Blurring a given image using moving average in Python 3

I've tried solving the following HackerRank question: Write a function blur_image() that takes as a parameter an image in the form of a nested list ...
145 views

### Discrete Lanczos Derivatives

I have a PR implementing denoising discrete Lanczos derivatives, following this paper. The following code works well, but the design is a train wreck, and I was hoping to get some advice to improve it....
109 views

136 views

### Reduce sample rate of GPS data based on distance between points

The algorithm needs to reduce an RDD[GPSRecord] based on the distance between several points, e.g. "give me only GPS records when the distance between them exceeds ...
156 views

### Temporal kernel filtering on video frames coming in a loop

I have a video which I read in a loop frame by frame. For every frame, I want to do temporal kernel filtering, the coefficients of which come from the input variable model (a dictionary). The temporal ...
122 views

### Generating a sinusoid sound signal in Java

Is there any legroom left for optimization (without switching to C)? ...
288 views

### Factory to create Finite Impulse Response filters in C++

I've recently begun a project in digital signal processing and am using C++ as the programming language. In this project, I have implemented several finite impulse response (FIR) filters. Many of ...
99 views

### Neuroscientific testing

I have written the code below for the following experiment: Subjects get simultaneous stimulation of left and right thumb and have to tell which one was stimulated "stronger" (with higher intensity, ...
2k views

### Perlin Noise Generator

I'm porting a 2-D Terrain Generator from Python to C++ as Python is too slow due to the number of features that have been added. I'm new to C++ and would like to know of any criticisms that you can ...
413 views

### Find signal's maximum peak in window

I have a 9-dimensional signal (as a csv from this Gist) that looks like this: A signal peaks every 30 steps. I want to get the maximum values of the peaks in that ...
91 views

### Wavelet decomposition of images

I am working on wavelet decomposition and found a formula for it and wrote it by myself for computation. The formula is: $$I_{LH}(i,j) = \sum_{p=1}^{N_L} \sum_{q=1}^{N_H}\ L(p)\ H(q)\ I(i+p, j+q)$$ ...
1k views

### Optimizing C++ equivalent of Matlab filter function

Minimum working example below. The Matlab filter function filters the input data x using a rational transfer function defined by the numerator and denominator ...
753 views

### Generate a random discrete signal

I currently have this code to generate a discrete signal with random amplitudes, but a fixed frequency: ...