Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
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 ...
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 ...
0 votes
2 answers
40 views

How to determine stripe width of a barcode

A barcode consists of alternating back and white stripes. Thin stripes are one "unit" wide. We'll assume fat stripes are 2 "units" wide. But how big is a "unit"? I can't ...
0 votes
2 answers
45 views

Getting the magnitude and phase of a single specific frequency from an audio signal

Assuming I only care to calculate the magnitude and phase of ONE single frequency from a signal, how can I get this information without calculating anything else? For example I want to come up with an ...
0 votes
1 answer
21 views

Constant Q transform where you keep the window size constant (so Q is no longer constant)?

I've been working on implementing a constant Q transform to try and detect musical notes within an audio signal and I came across an issue. When trying to detect low frequencies the constant Q ...
0 votes
1 answer
51 views

algorithm for second order butterworth filter

I want to implement an algorithm for a second order butterworth filter on the form $ H(s) = \dfrac{Y(s)}{U(s)}= \dfrac{1}{\left(\frac{s}{w_0}\right)^2+2\zeta\frac{s}{w_0}+1} $ I want to get it on the ...
0 votes
1 answer
42 views

How can I use a constant Q transform to detect low frequencies without making the buffer size too large?

I am trying to write code to detect musical notes within a signal. I have been reading up on different methods for extracting frequency information out of a signal to determine which notes were played ...
0 votes
0 answers
19 views

Unsupervised Real-Time Pattern Counting in Time Signal Data Without Prior Knowledge

I'm facing a problem and it seems I can't find a working solution since a few years. TLDR : Is there a well-known algorithm or NN-model that is able to autodetect and count patterns in a time signal ...
0 votes
1 answer
56 views

Can the Constant Q transform be implemented more efficiently using an FFT?

I am trying to implement a Constant Q transform in code and was wondering if there was an algorithm that took advantage of the FFT to speed up the calculation so it can be used efficiently in realtime ...
0 votes
0 answers
50 views

Doubts on implementation of a beamforming algorithm to produce narrower beams

I am trying to understand and implement in MATLAB, the algorithm described in the paper A Beamforming Method Based on Polarization Matching but my math background is not strong nor am I used to ...
1 vote
0 answers
39 views

--Which dither to use for narrowband speech?

The tl;dr What dither algorithm should I use when converting 24/48 mono speech to 8/8? -- I'm truncating and downsampling a 24/48 mono audio source containing only speech to 8/8. I won't be doing any ...
0 votes
1 answer
1k views

HOG descriptor algorithm

I would like to implement a HOG descriptor in C++. I found an implementation of this code in Open Pattern Recognition Project - Histograms of Oriented Gradients (HOG) Feature Extraction. An extract of ...
5 votes
1 answer
727 views

How to Use the Walsh Hadamard Transform to Filter 24 bit RGB Color Values in a Localized Spatial Region?

After reading this Signal processing Stack Exchange article tonight, What Is the Walsh Hadamard Transform? How Could One Use It in Image Processing?, I became interested in applying the Walsh-Hadamard ...
1 vote
1 answer
87 views

Steering Vectors and Bluetooth Low Energy for computing Angle of Arrival

I am new to signal processing, but I have background in mathematics. I am trying to use Bluetooth Low Energy (BLE) on three mobile devices, where one device is being tracked and the other two act as ...
1 vote
1 answer
451 views

Is there a FFT algorithm which is both in-place and constant geometry?

I work in crypto where the NTT (Number Theoretical Transform) which is just a FFT in finite fields is used. I wanted to know if there exists an implementation of the FFT which is both in-place and ...
5 votes
4 answers
3k views

Algorithm for 1d spline interpolation suitable for 8 bit microcontroler

What is a concise, fast, down to earth algorithm for doing (or closely approximating) spline interpolation on a 1d continuous stream of data? (Edit1: The paragraph below equates to saying "the ...
5 votes
0 answers
82 views

Efficient computation of 2^x (antilog2) for fixed-point

I've created a log2 AGC for an FPGA project, similar to Dan Boschen's solution in this question. I implemented a hardware version of log2 based on Dan's linked page in the previous question - ...
0 votes
0 answers
12 views

Exact computation cost using Forward Procedure for HMM probability evaluation

I am understanding the HMM concept for Speech Recognition. One of the three problems (HMM) to be solved is Probability evaluation $P(O|\lambda)$. Instead of a straightforward approach which is ...
2 votes
2 answers
76 views

Fit Data Samples with a Robust Fit

I have a data from a sensor which the connection model of $x$ and $y$ is known: For instance, in the case above, the model is linear. The issue is how to handle outliers. Specifically when there are ...
19 votes
6 answers
9k views

Fit a Piecewise Linear Model to Data with Unknown Knots and Number of Segments

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 ...
0 votes
0 answers
31 views

Differential value range reduction for Huffman encoding

I am trying to understand a piece of coding technology and place it in its context, but I am unable to find any literature on the subject. It would be much appreciated if someone could point me in the ...
1 vote
0 answers
94 views

How is the 'difference' of two audio tracks best computed, in order to maximise instrument isolation?

I'm hoping to improve the results of a simple application I've been working on, which aims to isolate as fully as possible the electric guitar heard (along with drums/bass/vocals) on a single track of ...
1 vote
3 answers
5k views

range-doppler map to range-velocity map conversion

UPDATE 2.0 I think I've managed to produce the correct range-velocity map. I'm struggling with analytically calculating the range which I expect to see on the range-velocity map. Could someone please ...
0 votes
1 answer
42 views

Why do extremals need to be located at the left-hand and right-hand band edges of each band?

I am reading the Remez algorithm for designing FIR filters. In the first paragraph of section 15.3.1 of Andreas Antoniou's digital signal processing book, I have two questions. extremals are to be ...
5 votes
1 answer
72 views

What algorithms exist for dynamic audio normalization?

I'm manually editing the WAV files for an audiobook. There are often sections where I have to amplify a section, and then amplify sub-sections due to the variability of the quality of the original ...
2 votes
2 answers
350 views

How to use MUltiple SIgnal Classification (MUSIC) algorithm to detect the wavenumber of a received signal at array of sensors?

I am working on analyzing data obtained from Fiber Optic - Distributed Acoustic Sensor (DAS) to estimate the properties of acoustic waves that impinge FO cable, such as velocity of acoustic waves. FO-...
1 vote
0 answers
21 views

implement gradient descent with sparsification algorithm

I am trying to implement the algorithm in this paper for finding a sparse vector x that minimizes the square error $\lVert y − \Phi x\rVert_2^2$ where $\Phi$ need to satisfy the restricted isometry ...
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 ...
1 vote
0 answers
64 views

Is `fft` always the best choice?

I hope this is the right place to ask this question since it is partially a note which might help others. Until recently, I always used the fft-algorithm ...
3 votes
1 answer
334 views

Why does the griffin lim algorithm work?

the griffin lim algorithm works to reconstruct audio from a magnitude spectrogram, but i don't understand how reusing the same spectrogram every iteration with noise can produce decent sound How from ...
13 votes
5 answers
10k 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 &...
26 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 ...
0 votes
2 answers
144 views

What is the name of this FFT technique for carrier recovery?

https://dsp.stackexchange.com/a/67221/69442 What is the name of this FFT-based technique whose code is given in the answer and whose link I added above? Can I find information about this in any paper?
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 ...
4 votes
1 answer
451 views

FFT seems more accurate than MUSIC algorithm?

I created a signal with two sinusoids and added increasing amounts of random noise to it. The results of running the FFT and MUSIC on this signal are shown in the image below. Ignoring the fact that ...
0 votes
0 answers
100 views

Cfar Algorithm Implementation

I am trying to implementation Cfar algorithm to our radar signal processing algorithm. I obtained some output but I want to be sure that is right. Cfar algorithm's output below like, I'm interpreting ...
5 votes
1 answer
814 views

One Too Many Non-Zero Eigenvalues in MUSIC DF Algorithm

I'm working on simulating the MUSIC algorithm in MATLAB to determine the azimuth angle of arrival of a simulated signal. My virtual antenna array consists of 4 antennas arranged in a plane. While I ...
0 votes
0 answers
53 views

How to detect known audio samples within a stream of audio

If I've got a bunch of short .wav files, 16 bit linear pcm, and an incoming stream of audio that's been run through a voice codec (g.722, g.711, or others) and then converted back to pcm, what's the ...
0 votes
1 answer
110 views

Which is faster: image segmentation or line detection?

Some papers use image segmentation techniques and others use edge detection. I need to know which one is faster. update: I need to do semantic segmentation for outdoor sense and the data is optical ...
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?
3 votes
4 answers
301 views

What is the equation I can use to create the inverse expoential graph?

I am seeking an equation I can apply to provide a score based on a measurable ability rating. It would be great to understand how the equation works so I can alter the curvature of this flexibly based ...
1 vote
1 answer
63 views

Measure of how well sounds fit together in a composition

Are there any approaches to gauge how well a sound may sit together with other sounds in a mix? I’m thinking about something similar to picking instruments that might go well together in a band. ...
18 votes
7 answers
7k 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 ...
4 votes
3 answers
129 views

Algorithm for finding best matching sin wave to input signal

Question Suppose I take a signal $y(t) = \cos(2\pi \cdot 4.1t + 2)$ and I sample it uniformly up to 2 seconds. Given only these time samples, how would I design an algorithm that finds the pair of ...
20 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'...
1 vote
1 answer
66 views

How should I go about calculating sines or cosines without the errors introduced solely by the transcendence of pi?

This may be irrelevant for many people but I'm asking this question because I don't need to do these things in real time, I don't care if modifying a 1-minute sound recording takes 5 minutes to ...
0 votes
2 answers
251 views

How to detect signal in spectrum without empirical data

Let's say, I have got a spectrum of a signal with noise using fft: For a human it's pretty obvious that there is a signal with a frequency of about 51Hz. But what is the mathematical apparatus behind ...
1 vote
1 answer
767 views

Convex Hull Area in Pixels

I am calculating different attributes for connected regions of the image, with the final goal of classification. One of the attributes I am working with is a sparsity measure, calculated as the ratio ...
3 votes
1 answer
205 views

Matching 2 Undirected Weighted Graph in MATLAB

Consider 2 undirected weighted graph as shown in figure. Consider first graph as $G_1$ and second graph as $G_2$. Graph $G_1$ consist of vertices $V=\{F_1,F_2,F_3,F_4,F_5\}$ and graph $G_2$ consist of ...
2 votes
1 answer
201 views

How to Reduce the Overfitting of a Linear Classifier

I am working in linear classification such as $$y=ax+b.$$ where $x=[x_1...x_n]$. But the method has weakness that is overfitting problem. Could you suggest to me one method or one way to reduce ...

1
2 3 4 5
9