Questions tagged [fft]

FFT is short for fast Fourier transform, any of a set of algorithms for quickly computing the discrete Fourier transform (DFT).

The FFT finds a lot of application in data analysis, particularly time-series and image data, and particularly when the data has a periodic nature, or at least a periodic component. The FFT also finds application in digital filtering. There are many FFT algorithms; they all calculate the Discrete Fourier Transform in O(n log n) operations, while the naive DFT implementation is O(n^2).

Mathematically, the Fourier Transform fits a set of sinusoids to the input data - revealing relative strengths of periodic components of the signal. The fit is optimal in a least-squared error sense. In the case of the Discrete Fourier Transform, the sinusoids are periodically related.

Related topics include DFT, signal processing, convolution, and window functions.

More information on FFT can be found in the Wikipedia article on FFT.

5308 questions
2
votes
1 answer

Matlab- anomalous fft2 display

I'm trying to plot a 2D fft of a simple image in matlab, however the resulting plot looks very strange and unlike any 2D fft plots I have encountered so far. It is mostly white, with a few grid-like dotted black lines. this is the code for the plot…
Rallad
  • 101
  • 10
2
votes
1 answer

Understanding Formants from Audio Signal

I went through the Matlab tutorial on Formant Estimation using LPC Coefficients. Though I vaguely understand the details, it's not entirely clear why we need to do this. From http://person2.sol.lu.se/SidneyWood/praate/whatform.html: A formant is a…
Sean
  • 445
  • 1
  • 5
  • 10
2
votes
2 answers

Are there any open source libraries for performing FFTs on the iPhone?

I would like to compare to WAV audio files using an FFT. What open source libraries and / or sample code exist for performing such an operation?
Warrior
  • 39,156
  • 44
  • 139
  • 214
2
votes
1 answer

FFT removal of periodic noise

This a much discussed topic, but I happen to have an issue that has not been answered yet. My problem is not the method it self but rather it's applicability: My image's f(x,y) represent physical values that can be negative or positive. When I mask…
Sebastiano1991
  • 867
  • 1
  • 10
  • 26
2
votes
1 answer

How to use the given FFT function in C?

Sorry this is the first time for me to ask question here, I've given a FFT function void fft_1d(int n, float xr[256], float xi[256], int ntype) { /* compute the FFT of a complex signal xr and xi are the real and imaginary parts respectively …
Nick Li
  • 51
  • 2
2
votes
0 answers

How can I change irregular wave into Fourier series

I made irregular wave consisting of 16 regular waves with random phase difference. In addition, I tried to divide the irregular wave to several waves which are forms of fourier series. So I made the code below line 11. But when I ran this code, I…
양희승
  • 21
  • 1
2
votes
0 answers

Large kernel wait using numpy.fft with multiprocessing

I would like to compute a set of ffts in parallel using numpy.fft.fft and multiprocessing. Unfortunately, running the ffts in parallel results in a large kernel load. Here is a minimal example that reproduces the problem: # fft_test.py import numpy…
Till Hoffmann
  • 9,479
  • 6
  • 46
  • 64
2
votes
2 answers

Got an extra line on python plot

i'm using pyplot to show the FFT of the signal 'a', here the code: myFFT = numpy.fft.fft(a) x = numpy.arange(len(a)) fig2 = plt.figure(2) plt.plot(numpy.fft.fftfreq(x.shape[-1]), myFFT) fig2.show() and i get this figure There is a line from the…
user3734366
  • 69
  • 1
  • 8
2
votes
1 answer

scipy.signal.spectrogram output not as expected

I am using scipy.signal.spectrogram() for analysing a dataset containing values for a current. My input to the function is as follows: f, t, Sxx = signal.spectrogram(y, fs) (for plotting in subplot 3 (from the top) I use plt.pcolormesh(t, f,…
roggjah
  • 21
  • 1
  • 5
2
votes
2 answers

Zero-padded FFT in Julia

How can I calculate the fft zero-padded to a specific length in Julia? Naturally, I can append zeros to my vector, but that seems awkward. I cannot find anything about this in the docs, nor does calling methods(fft) seem to bring up any relevant…
DNF
  • 11,584
  • 1
  • 26
  • 40
2
votes
1 answer

Homomorphic Filter output

I have written the following code to develop a Homomorphic Filter. I think (I am not sure though) the color images are being filtered well. In case of Grayscale images, Why is the kernel always Green? Also, the filter was supposed to be…
user366312
  • 16,949
  • 65
  • 235
  • 452
2
votes
2 answers

How to implement my own HPS algorithm?

I'm starting a project on Python where I need to develop a pitch-detection system, basically what I have to do is to record a sound coming from a guitar string, then Identify which is the tone of that sound. I have read and searched through websites…
Teddy S.
  • 33
  • 8
2
votes
1 answer

Blurred rather than Sharpened

I am using the following Kernel, double[,] kernel = new double[,] { { -1, -1, -1, }, { -1, 9, -1, }, { -1, -1, -1, }, }; The following code seems to be blurring…
user366312
  • 16,949
  • 65
  • 235
  • 452
2
votes
1 answer

cuFFT cannot recover after an error

I cannot find a way to start cuFFT processing after a previous unsuccessful launch. Here is a minimal example. The main idea is as follows: we create a simple cuFTT processor which can manage its resources ( device memory and cuFFT plans). We check…
Grisha Kirilin
  • 282
  • 2
  • 12
2
votes
2 answers

numpy's fast Fourier transform yields unexpected results

I am struggling with numpy's implementation of the fast Fourier transform. My signal is not of periodic nature and therefore certainly not an ideal candidate, the result of the FFT however is far from what I was expecting. It is the same signal,…
Paul
  • 999
  • 1
  • 12
  • 29