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
62
votes
10answers
42k 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 "...
35
votes
4answers
13k 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
5answers
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
6answers
2k 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 ...
22
votes
3answers
11k views

Fastest Algorithm for Distance Transform

I am looking for the fastest available algorithm for distance transform. According to this site http://homepages.inf.ed.ac.uk/rbf/HIPR2/distance.htm, it describes: The distance transform can be ...
22
votes
2answers
10k 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 ...
22
votes
1answer
6k 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 ...
18
votes
9answers
2k 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 $$...
18
votes
5answers
8k 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 ...
17
votes
3answers
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
7answers
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 ...
15
votes
1answer
5k 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 ...
15
votes
2answers
6k 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 ...
14
votes
5answers
8k 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 ...
14
votes
1answer
1k 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
6answers
5k 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 ...
13
votes
3answers
23k 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 ...
13
votes
2answers
4k 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, ...
13
votes
2answers
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 "...
12
votes
2answers
21k 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
2answers
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 ...
12
votes
4answers
324 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
2answers
2k 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 from an ...
12
votes
1answer
559 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
1answer
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
4answers
13k 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
3answers
15k 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|}...
11
votes
1answer
6k 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
2answers
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
3answers
899 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
5answers
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 ...
10
votes
1answer
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
1answer
177 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
4answers
7k 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 multiplies per output sample. And by "reasonably ...
9
votes
3answers
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
2answers
844 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
2answers
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 ...
9
votes
2answers
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 ...
9
votes
1answer
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
5answers
1k 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 ...
8
votes
4answers
2k 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 ...
8
votes
1answer
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: ...
8
votes
2answers
377 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 ...
8
votes
3answers
331 views

Best Approach to Rank Complex Magnitude Comparision Problem

This is in reference to the responses for an efficient algorithm for the comparison of bounded fixed point complex numbers at this post. Efficient Magnitude Comparison for Complex Numbers See the ...
8
votes
4answers
9k views

Optimized Ansi C libraries for DSP

I am new to DSP? Where is a good resource for open source DSP algorithms? MATLAB is great at making protos but once we move to C coding, it takes time and we end up making too many mistakes. I would ...
8
votes
1answer
1k views

Detecting a fixed template image out of a semi-constant frame of video

There are a number of videos that I'm looking to process of different video games to detect various "states" in them. The first game that I am tackling is any edition of Super Street Fighter 4. In ...
8
votes
1answer
2k views

Help with algorithm for modulating oscillator pitch using LFO

I am developing a software emulation of an analog synthesizer. I am trying to modulate the pitch of an oscillator using an LFO. For each sample fed to the computer's sound system, I am calculating ...
8
votes
1answer
970 views

Least Squares Re Synthesis of Short Time Fourier Transform (STFT)

Working with my own MATLAB implementation of the short-time Fourier transform (STFT), I've managed to write code for the analysis step where a 1D time-domain signal $s[t]$ is progressively windowed, ...
7
votes
3answers
6k 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 ...
7
votes
3answers
2k views

How does sensor fusion work? I want to understand the math/physics/algorithms

Sensor fusion algorithms can give a more precise 3D orientation (and possibly postion?) of a device by combining readings from an accelerometer, gyroscope, and magnetometer. Can anyone explain, or ...

1
2 3 4 5
8