Questions tagged [algorithms]
Algorithm is a method expressed in a finite list of steps of well-defined instructions to process a signal.
432
questions
68
votes
10
answers
48k
views
Algorithm(s) to mix audio signals without clipping
I'd like to mix two or more PCM audio channels (eg recorded samples) digitally in an acoustically-faithful manner, preferably in near-real-time (meaning little or no peek-ahead).
The physically "...
37
votes
4
answers
15k
views
What are good ways to detect signal clipping in a recording?
Given a recording I need to detect whether any clipping has occurred.
Can I safely conclude there was clipping if any (one) sample reaches the maximum sample value, or should I look for a series of ...
34
votes
5
answers
5k
views
What factors should I consider in choosing an edge detection algorithm?
I've learned about a number of edge detection algorithms, including algorithms like Sobel, Laplacian, and Canny methods. It seems to me the most popular edge detector is a Canny edge detector, but is ...
27
votes
6
answers
3k
views
Calculating the PDF of a waveform from its samples
A while ago I was trying different ways to draw digital waveforms, and one of the things I tried was, instead of the standard silhouette of the amplitude envelope, to display it more like an ...
25
votes
3
answers
12k
views
Fastest Algorithm for Distance Transform
I am looking for the fastest available algorithm for distance transform.
According to Image Processing Learning Resources - HIPR 2 (HYPERMEDIA IMAGE PROCESSING REFERENCE) - Morphology - Distance ...
23
votes
1
answer
7k
views
What is the difference between Remez exchange and Parks-McClellan filter design?
A question recently came up regarding Parks-McClellan and some of the comments point out that the wikipedia article on Parks-McClellan states,
...the Parks-McClellan algorithm is a variation of ...
22
votes
2
answers
11k
views
Inverse Short Time Fourier Transform algorithm described in words
I'm trying to conceptually understand what is happening when the forward and inverse Short Time Fourier Transforms (STFT) are applied to a discrete time-domain signal. I've found the classic paper by ...
19
votes
9
answers
3k
views
Efficient Magnitude Comparison for Complex Numbers
Is there a more efficient algorithm (or what is the most efficient known algorithm) to select the larger of two complex numbers given as $I + jQ$ without having to compute the squared magnitude as
$$...
19
votes
9
answers
7k
views
Is there an algorithm to compute the phase for a single frequecy?
If you have a function $f(t)=A \cdot \sin(\omega t+\phi)$, and reference sin wave $\sin(\omega x)$ what would be a fast algorithm to compute $\phi$?
I was looking at Goertzel algorithm, but it doesn'...
19
votes
5
answers
9k
views
Fit piecewise linear data
What is a robust way to fit piecewise linear but noisy data?
I'm measuring a signal, which consists of several almost linear segments. I'd like to atomatically fit several lines to the data to ...
18
votes
7
answers
6k
views
What are some of the differences between DFT and FFT that make FFT so fast?
I'm trying to understand FFTs, here's what I have so far:
In order to find the magnitude of frequencies in a waveform, one must probe for them by multiplying the wave by the frequency they are ...
17
votes
3
answers
7k
views
Contours matching - finding contours displacement
I found contours on two images with same object and I want to find displacement and rotation of this object. I've tried with rotated bounding boxes of this contours and then its angles and center ...
16
votes
5
answers
9k
views
When to consider double (64 bit) floating point for Audio
When synthesizing and processing audio on modern processors, when would one consider using something other than single precision (32 bit) floating point? Obviously, the audio coming in and going out ...
16
votes
3
answers
25k
views
Autocorrelation in audio analysis
I'm reading up on Autocorrelation, but I'm not sure I understand exactly how it works and what output I should expect. Am I right in thinking that I should input my signal to the AC function and have ...
16
votes
2
answers
7k
views
Bitmap alpha bevel algorithm?
I am looking to create an algorithm which adds a bevel effect to a bitmap using it's alpha as a bump map.
How would I go doing something like this? I have tried specular lighting but I only get the ...
15
votes
1
answer
6k
views
Binary robust independent elementary features ("BRIEF") understanding
How are the descriptors in the BRIEF algorithm matched to each other?
How is the template image found in the another image? How do we compare the descriptors?
I have read that article but didn't ...
14
votes
6
answers
6k
views
What Approximation Techniques Exist for Computing the Square Root?
I have very limited resources as I'm working with a microcontroller. Is there a taylor-series expansion, common lookup table, or recursive approach?
I'd prefer to do something without using math.h's ...
14
votes
2
answers
5k
views
methods of computing fixed point atan2 on FPGA
I am in need of computing atan2(x,y) on an FPGA with a continuous input/output stream of data. I managed to implement it using unrolled, pipelined CORDIC kernels, ...
14
votes
2
answers
30k
views
Which kind of machine learning algorithm is Hidden Markov Model?
I have used Hidden Markov Model algorithm for automated speech recognition in a signal processing class. Now going through Machine learning literature i see that algorithms are classified as "...
14
votes
1
answer
2k
views
Estimating onset time of a tone burst in noise?
What techniques might one use to estimate the onset time of a sinusoidal tone burst in a noisy signal?
Assume the tone burst has a known fixed frequency (but unknown phase) and a very sharp rise ...
13
votes
9
answers
3k
views
Estimate Sine Frequency under White Noise — simple and effective method
Given a sinusoidal signal in white noise, how can one efficiently determine its frequency?
13
votes
5
answers
9k
views
Looking for an arcsin algorithm
Does anyone have a simple algorithm for computing a reasonably accurate arcsine?
By "simple" I mean some sort of polynomial that requires <= 5 multiplications per output sample. And by &...
13
votes
2
answers
2k
views
Detecting drum bpm in a noisy .wav file
I am looking for algorithm(s) to solve the following problem:
Given a noisy .wav sound capture (some wind + friction noise on the microphone), how to detect the BPM of a soft drum beat?
I have ...
13
votes
2
answers
3k
views
What Is the Algorithm Behind Photoshop's "Black and White" Adjustment Layer?
Can someone explain the algorithm behind the "Black and White" adjustment layer in photoshop?
I have to reproduce it using C++ for an application that emphasizes non-red/magenta(ish) pixels ...
12
votes
6
answers
7k
views
Kalman Filter - Implementation, Parameters and Tuning
First of all, this is the first time I try to make a Kalman filter.
I earlier posted the follwoing question Filter out noise and variations from speed values on StackOverflow which describes the ...
12
votes
2
answers
25k
views
High quality reverb algorithm
I did a bit of searching on this site but surprisingly, I didn't find much relevant information, and my knowledge of DSP is very very limited.
My goal is quite simple : I want to program an ...
12
votes
4
answers
341
views
Any references for the trade-off between software and mechanics/optics in industrial machine vision systems?
I explain my question with a simplified example.
I can design an industrial vision system for the automatic inspection of an item with these main requirements:
the image of a good piece must be a ...
12
votes
1
answer
578
views
Recognizing math functions within songs
I'm new to DSP, and just discovered this StackExchange, so apologies if this isn't the right place to post this question.
Is there a resource that describes genres in a more mathematical terms? For ...
12
votes
1
answer
1k
views
Determining how similar audio is to human speech
While looking for an answer to this problem, I found this board so decided to cross post this question of mine from Stack Overflow.
I am searching for a method of determining the similarity between ...
11
votes
4
answers
15k
views
Programming a Vocoder
I'm want to program my own vocoder synthesizer like "Songify" but I can't find a simple of vocoder algorithm. Maybe you can explain or tell where to look for information on how vocoder works.
11
votes
1
answer
7k
views
Applying A-weighting
I want to calculate the loudness of a given signal and I've come across this thread. I'm slightly confused about the A-Weighting aspect of it. I can't post images, but I think this site has the ...
11
votes
2
answers
1k
views
What's the Underlying Algorithm for Detail Preserving Upsampling in Photoshop CC?
The detail-preserving upsampling algorithm in Photoshop CC is truly amazing. It can upscale any image while preserving details in almost real-time. And I truly wonder how it is implemented.
I've ...
11
votes
3
answers
1k
views
How to measure the agreement between to curves?
I have values (plotted below) of expected RSSI values over time that I would like to compare with my measured RSSI values. What I was looking for was a way to quantify it so I can change parameters ...
10
votes
4
answers
3k
views
Books/resources for implementing various mathematical functions in fixed point arithmetic for DSP purposes
I'm looking for books or resources that cover the following in detail:
implementing mathematical functions (e.g., logarithm, exponential, sine, cosine, inverse) in fixed point arithmetic for DSP ...
10
votes
2
answers
1k
views
What is the name of a low-pass filter that tracks rate of change?
When applying a low-pass filter to a constantly changing signal, there will be a lag between the actual value and the filtered value. For example, if f(x) = x, the ...
10
votes
3
answers
18k
views
Digital Distortion effect algorithm
I read the DAFX book by Udo Zölzer about the distortion effect at pages 124-125
and it says that suitable simulation of the distortion is given by the function:
$$f(x)=\frac{x}{|x|}\left(1-e^{x^2/|x|}...
10
votes
5
answers
2k
views
Fast & accurate convolution algorithm (like FFT) for high dynamic range?
It seems that FFT-based convolution suffers from limited floating-point resolution due to evaluating everything around the roots of unity, as you can see in the $10^{14}$-factor error in this Python ...
10
votes
2
answers
1k
views
Examples of linear/logistic regression applications
I was wondering about super simple applications of linear or logistic regression to signal processing (image processing specifically)?
I'm a math guy that's been asked to explain some mathematical ...
10
votes
2
answers
2k
views
References on the MP3 encoding algorithm
Does anybody have a reference describing the MP3 algorithm in a step-by-step manner and clear to understand?
These references were a little bit confusing:
Audio compression using modified ...
10
votes
1
answer
1k
views
How do I implement an adaptive thresholding algorithm for underwater sonar
I want to implement an adaptive thresholding algorithm in MATLAB for filtering data received by an underwater sonar receiver. The data received has an interactive noise component resulting from ...
10
votes
1
answer
183
views
Data decomposition method invariant to small shift and scale?
Is there a data decomposition method similar to eigenvalue that estimates projection matrix to reduce dimensionality but does not project similar vectors too far away in euclidian distance terms from ...
9
votes
3
answers
8k
views
Algorithm to pan audio
I'm looking for a way to pan the PCM audio I have.
At the moment the audio is in a stereo format and I would like to pan it to the desired side (or more/less to a side).
I've recently figured out how ...
9
votes
5
answers
803
views
Identify abrupt changes in an audio waveform
I have an audio file which was created by substituting multiple speech segments into an original utterance.
I want to find the timestamps where such substitutions happened, so I guess that one thing I ...
9
votes
1
answer
2k
views
Detecting changes between voice and music
I have a bunch of audio files that have both speech and music parts (think radio). For instance, a given file might consist of the following sections:
...
9
votes
1
answer
19k
views
Understanding FFT: FFT size and bins
I'm trying to implement an FFT to understand how it works.
I'm using a random sound file (so I can't control the size of the signal), with a sampling frequency of 44,1Khz.
I'm using this library: Fft....
9
votes
3
answers
7k
views
How to get started with fingerprint recognition?
I have started with Matlab and Digital Image Processing. I am trying to do Fingerprint recognition. I found many research papers regarding this but I am unsure where to start. Concisely, what is the ...
9
votes
4
answers
9k
views
Optimized ANSI C libraries for DSP
I am new to DSP. Are there good open source ANSI C implementations of DSP algorithms?
MATLAB is great at prototyping but once we move to coding in C, it takes time and we end up making too many ...
9
votes
2
answers
1k
views
Duration of unknown rectangular pulse with additive white Gaussian noise
Problem.
There is a discrete signal $f[i]$ (example below).
It is known, that $f[i]$ have a form of rectangular pulse with additive white Gaussian noise.
$f[i] = s[i] + n[i]$,
$s[i] = \alpha(\...
9
votes
1
answer
2k
views
Frequency Modulation Synthesis Algorithm
Based on what I read, I've made an algorithm for FM sound synthesis. I'm not sure if I did it right. When creating a software synth instrument a function is used to generate an oscillator and a ...
8
votes
2
answers
414
views
main direction in 2D map of data
It may be a very simple question. We would appreciate any comments, guide or complete solution. We prefer however incomplete solutions but novel practical ideas.
- How to find the main direction of ...