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
14
votes
1 answer

Using IOS Accelerate Framework for 2D Signal Processing on Non-Power-of-Two images?

//EDIT... I'm editing my question slightly to address the issue of working specifically with non-power-of-two images. I've got a basic structure that works with square grayscale images with sizes like 256x256 or 1024x1024, but can't see how to…
Angus Forbes
  • 982
  • 1
  • 9
  • 21
14
votes
1 answer

iOS FFT Accerelate.framework draw spectrum during playback

UPDATE 2016-03-15 Please take a look at this project: https://github.com/ooper-shlab/aurioTouch2.0-Swift. It has been ported to Swift and contains every answer you're looking for, if you cam here. I did a lot of research and learned a lot about FFT…
benjamin.ludwig
  • 1,575
  • 18
  • 28
13
votes
3 answers

Processing Audio Data using Fourier Transforms in Java

I'm trying to process audio data. I'm working with Java. I've extracted the audio data to an array. Now I should pass N data samples to a function that calculates the Discrete Fourier Transform (or Fast Fourier Transform, which is more efficient).…
dedalo
  • 2,541
  • 12
  • 32
  • 34
13
votes
1 answer

How plot the Riemann zeta zero spectrum with the Fourier transform in Mathematica?

In the paper "The Riemann Hypothesis" by J. Brian Conrey in figure 6 there is a plot of the Fourier transform of the error term in the prime number theorem. See the plot to the left in the image below: In a blog post called Primes out of Thin Air…
Mats Granvik
  • 233
  • 5
  • 15
13
votes
1 answer

FFT in Matlab and numpy / scipy give different results

I am trying to re-implement one of the matlab toolboxes. they use fft over there. when i perform same operation on the same data i get different results to those from matlab. Just take a look: MATLAB: Msig = 0 0 0 0 0 0 0 …
Chris
  • 570
  • 2
  • 9
  • 19
13
votes
1 answer

Determining frequency of an array in Python

I have a sample file filled with floating point numbers as follows: -0.02 3.04 3.04 3.02 3.02 3.06 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.04 3.04 3.02 3.04 3.02 3.04 3.02 3.04 3.02 3.06 3.02 3.04 3.02 …
y33t
  • 649
  • 4
  • 14
  • 23
13
votes
3 answers

Fast Fourier Transform

I need to multiply two polynomials each having small integral coefficients. I need a fast FFT routine in C/C++ which can convolve them. I have seen several libraries but they seem to be too large spread over multiple files. What is important is I…
Nikhil Garg
  • 3,944
  • 9
  • 30
  • 37
13
votes
1 answer

Creating spectrogram from .wav using FFT in java

After researching and a lot of trials-and-errors, I have come to a point that I can construct a spectrogram which I think it has element of rights and wrongs. 1. First, I read .wav file into a byte array and extract only the data part. 2. I convert…
Aung
  • 253
  • 1
  • 5
  • 15
13
votes
2 answers

FFT on image with Python

I have a problem with FFT implementation in Python. I have completely strange results. Ok so, I want to open image, get value of every pixel in RGB, then I need to use fft on it, and convert to image again. My steps: 1) I'm opening image with PIL…
Tatarinho
  • 754
  • 2
  • 11
  • 31
13
votes
2 answers

Matlab Template Matching Using FFT

I am struggling with template matching in the Fourier domain in Matlab. Here are my images (the artist is RamalamaCreatures on DeviantArt): My aim is to place a bounding box around the ear of the possum, like this example (where I performed…
13
votes
2 answers

Is there any simple C++ example on how to use Intel MKL FFT?

I need to perform FFT and Inverse-FFT transformations. The input would be vector and matrices of double. Ideally, the output should be an array of std::complex but I can live with double _Complex. I haven't found any simple example, all Intel…
Baptiste Wicht
  • 7,472
  • 7
  • 45
  • 110
13
votes
1 answer

How to apply data parallelim on haskell Fast Fourier Transformation?

I have a haskell code to resolve a Fast Fourier Transformation, and i want to apply data parallelism on it. However, every strategy that i use generate too many sparks and most of them are being overflowed. Does anyone have any idea on how to apply…
lucasmoura
  • 275
  • 1
  • 10
13
votes
5 answers

Converting an FFT to a spectogram

I have an audio file and I am iterating through the file and taking 512 samples at each step and then passing them through an FFT. I have the data out as a block 514 floats long (Using IPP's ippsFFTFwd_RToCCS_32f_I) with real and imaginary…
Goz
  • 61,365
  • 24
  • 124
  • 204
13
votes
2 answers

Detecting noise via mic while playing a song on iPhone

I am making an app that should play a simple audio track and let me know if there is any noise in the vicinity while the track is playing. This is done by doing a live recording from the microphone while the song plays on the iPhone's loudspeaker.…
Marco Tolman
  • 321
  • 2
  • 11
12
votes
1 answer

Understanding FFT in aurioTouch2

I've been looking at aurioTouch 2 from Apple' sample code (found here). At the end of the day I want to analyze the frequencies myself. For now I'm trying to understand some of what's going on here. My apologies if this is trivial, just trying to…