Questions tagged [algorithms]

Algorithm is a method expressed in a finite list of steps of well-defined instructions to process a signal.

Filter by
Sorted by
Tagged with
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 "...
bryhoyt's user avatar
  • 1,413
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 ...
Han's user avatar
  • 799
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 ...
PearsonArtPhoto's user avatar
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 ...
endolith's user avatar
  • 15.7k
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 ...
Karl's user avatar
  • 817
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 ...
Mark Borgerding's user avatar
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 ...
Nicholas Kinar's user avatar
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 $$...
Dan Boschen's user avatar
  • 48.9k
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'...
SamFisher83's user avatar
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 ...
P3trus's user avatar
  • 351
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 ...
Seph Reed's user avatar
  • 305
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 ...
krzych's user avatar
  • 317
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 ...
user1849104's user avatar
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 ...
XSL's user avatar
  • 671
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 ...
Shedokan's user avatar
  • 309
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 ...
maximus's user avatar
  • 451
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 ...
tarabyte's user avatar
  • 395
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, ...
user2913869's user avatar
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 "...
user1411110's user avatar
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 ...
hotpaw2's user avatar
  • 35.2k
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?
RyanRonald's user avatar
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 &...
Richard Lyons's user avatar
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 ...
Alex K's user avatar
  • 275
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 ...
Blamoo's user avatar
  • 133
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 ...
Ole-M's user avatar
  • 221
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 ...
Dinaiz's user avatar
  • 373
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 ...
Alessandro Jacopson's user avatar
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 ...
XSL's user avatar
  • 671
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 ...
Jeff Gortmaker's user avatar
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.
Rytis Alekna's user avatar
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 ...
TryNCode's user avatar
  • 213
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 ...
Void Main's user avatar
  • 211
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 ...
toozie21's user avatar
  • 379
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 ...
RuD's user avatar
  • 103
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 ...
jpa's user avatar
  • 683
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|}...
Elior's user avatar
  • 231
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 ...
user541686's user avatar
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 ...
Cannoliopsida's user avatar
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 ...
user avatar
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 ...
Saurabh's user avatar
  • 101
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 ...
Chesnokov Yuriy's user avatar
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 ...
Dries's user avatar
  • 193
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 ...
Long's user avatar
  • 143
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: ...
haroba's user avatar
  • 203
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....
Bouji's user avatar
  • 103
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 ...
krammer's user avatar
  • 387
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 ...
Ktuncer's user avatar
  • 816
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(\...
Nikolai Popov's user avatar
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 ...
Matthew Mitchell's user avatar
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 ...
Developer's user avatar
  • 1,119

1
2 3 4 5
9