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
0 answers

Image processing and Fast Fourier Transformation

I am developing an application which does image processing in real time to get the y-sum and time between each frame. They are stored in 2 double arrays and for further implementations i need to run Fast Fourier Transformation on these values. I…
Mill3r
  • 544
  • 1
  • 10
  • 31
2
votes
0 answers

Doing IFFT and saving back to wavfile doesn't work

I have the following function where I'm trying to do FFT on a audio file and reset the phases and putting it all back together as a new audio file. First I do the FFT on both channels and then normalize the amplitudes. When I'm trying to do the…
bnc
  • 57
  • 2
  • 14
2
votes
1 answer

How do I scale an FFT-based cross-correlation such that its peak is equal to Pearson's rho

Description of the problem FFT can be used to compute cross-correlation between two signals or images. To determine the delay or lag between two signals A and B, it suffices to locate the peak of: IFFT(FFT(A)*conjugate(FFT(B))) However, the…
rjonnal
  • 1,137
  • 7
  • 17
2
votes
0 answers

Multiply very large multivariate polynomials

I need to multiply 2 very large multivariate polynomials P and Q. They have 16 variables x1,...x16 and around 2^30 monoms. We can write P = sum(i=0..2^32 pi*x1^di1*x2*di2...x16*di16) All the coefficients pi are less than 64. All the powers dij are…
2
votes
1 answer

Pitch detection and change java

I'm french so I'm sorry if you have trouble to understand some of my sentences. Anyways, I saw in some topics that the pitch could be fetected thanks to the Fourier transform but I didn't really understand how to implement it. Moreover, I didn't…
omegas27
  • 21
  • 2
2
votes
1 answer

analyzing FFT data for mean frequency?

I used numpy fft.fft to analyze some time series data (black) and generate a plot like the following: From the FFT data (in red) i calculated mean frequency by multiplying x*y for each data point and dividing by the number of data points. Is this…
Bobby M
  • 159
  • 1
  • 2
  • 9
2
votes
1 answer

Computing the energy of a signal over 30 second periods in Python

I'm new both to Python and to signal processing, so pardon possible misuse of jargon. I have the discrete values of a signal in a Pandas dataframe x, spaced 1 second apart. It looks like this: 2017-08-02 16:42:00 0.363657 2017-08-02 16:42:01 …
Pandora
  • 203
  • 1
  • 3
  • 7
2
votes
0 answers

Python pyfftw memory usage

Task: Fast real-to-complex FFT computation of a large array. The shape of array a is (103430 x 1 x 100 x 900) where the dimensions are (time, a dummy dim, longitude, latitude), so let's say (~100000 x 1 x 100 x 900). The FFT should be computed over…
bproxauf
  • 1,076
  • 12
  • 23
2
votes
1 answer

Why does treating the index as a continuous variable not work when performing an inverse discrete Fourier transform?

I have a set of points describing a closed curve in the complex plane, call it Z = [z_1, ..., z_N]. I'd like to interpolate this curve, and since it's periodic, trigonometric interpolation seemed a natural choice (especially because of its increased…
NNN
  • 135
  • 6
2
votes
2 answers

FFT window causing unequal amplification across frequency spectrum

I am using FFTW to create a spectrum analyzer in C++. After applying any window function to an input signal, the output amplitude suddenly seems to scale with frequency. Retangular Window Exact-Blackman Graphs are scaled logarithmically with a…
2
votes
1 answer

Matlab not plotting the exact fourier signal

I'm trying to plot a simple signal in fourier domain using Matlab. It's not plotting the correct signal. Here is my code: clc; clear all; close…
Bharat
  • 1,044
  • 15
  • 34
2
votes
0 answers

Spotify iOS SDK FFT with EZAudio returning NaN

I am trying to perform fft on Spotify's audio stream using EZAudio. Following this suggestion, I have subclassed SPTCoreAudioController, overrode attemptToDeliverAudioFrames:ofCount:streamDescription:, and initialized my SPTAudioStreamingController…
Braden Bagby
  • 273
  • 1
  • 8
2
votes
1 answer

Setup for Apple's Accelerate FFT for the iPhone

i am trying to understand the concepts of digital sound proceesing and i want to implement the FFT of Apple's Accelerate Framework link. In the vDSP API you can find a nice and fast FFT but unfortunately i can not set it up right. I think the…
user551640
2
votes
2 answers

Help with using FFT to determine frequency of an audio sample

I'm currently developing a percussion tutorial program. The program requires that I can determine what drum is being played, to do this I was going to analyse the frequency of the drum recording and see if the frequency is within a given range. I…
2
votes
1 answer

numpy fft returns orginal frequency when plotting

import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.read_csv('signal180_single.csv', sep=',', header=None) x = df.values length = len(x) # frequency 0.02s fs = 50.0 t = np.arange(0, length/fs,1.0/fs) xF = np.fft.fft(x) N…