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

JTransforms FFT: Difference between even and odd-case

I perform a FFT on an array of arbitrary length. The API can be cited as follows: realForward public void realForward(double[] a) Computes 1D forward DFT of real data leaving the result in a. The physical layout of the output data is as…
Jan
  • 343
  • 2
  • 16
2
votes
1 answer

How to determine from the Power Spectral Density if my data is 1/f noise?

Say you have the following series of values: import numpy as np data1=np.array([1, 0.28571429, 0.20408163, 0.16326531, 0.14285714, 0.10204082, 0.08163265, 0.06122449, 0.04081633, 0.02040816]) You now want to plot the Spectral…
FaCoffee
  • 7,609
  • 28
  • 99
  • 174
2
votes
1 answer

Frequency Voltage Graph from EEG Data - FFT in Python

I'm slightly unsure how to handle this as it's a topic which is new to me so any guidance with my code would be greatly appreciated. I have a set of eeg recordings (18949 EEG records with a sampling rate of 500Hz, where the records are in nV). I'm…
2
votes
3 answers

How can I do real-time pitch detection in .Net?

I want to make a program that detects the note that is being played in front of the microphone. I am testing the FFT function of Naudio, but with the tests that I did in audacity it seems that FFT does not detect the pitch correctly. I played an C5,…
Aaron de Windt
  • 16,794
  • 13
  • 47
  • 62
2
votes
1 answer

FFT with Math.NET 4.0 - Complex32[] vs. Complex[]

I have a problem calculating the FFT from my data set, using Math.NET with .NET4.0. I used .NET 3.5 with Math.NET like this without any errors: public Ergebnisse_FFT_Abs_PSD_MNF FFT_Abs_PSD_MNF(double[] data) { Complex[] samples =…
JoMa
  • 25
  • 5
2
votes
2 answers

DSP libraries - RFFT - strange results

Recently I've been trying to do FFT calculations on my STM32F4-Discovery evaluation board then send it to PC. I have looked into my problem - I think that I'm doing something wrong with FFT functions provided by manufacturer. I'm using CMSIS-DSP…
Jejh
  • 85
  • 2
  • 12
2
votes
0 answers

Python: power spectrum from 3d database

I am trying to calculate the power spectrum (1D) of a regular distributed 3D density database. But I keep getting the peak of power spectrum at 0. I am appreciating for your help! Here is my code: import numpy as np import matplotlib.pyplot as…
Donna
  • 21
  • 2
2
votes
1 answer

OpenCV / C++ - Convert image to vector of doubles for FFT (Fast Fourier Transform)

I'm trying to compute the FFT (Fast Fourier Transform) of an image to use the frequencies to determine whether or not the image is blurry. I need to use a custom FFT algorithm that we already have in our codebase. The FFT algorithm requires a…
Phorce
  • 4,424
  • 13
  • 57
  • 107
2
votes
1 answer

How do i get all the numbers of fft bins in a defined frequency band?

I use the matlab software. To my question. I have a audio signal, on which i am applying a STFT. I take a segment (46 ms, specifially chosen) out of my signal y(audio signal) and use a FFT on it. Then i go to the next segment, until to end of my…
user6281035
2
votes
0 answers

iOS: How to get streaming data from Apple music

Now, I'm trying to make music visualization app. Is there any way to get streaming audio data from Apple music. I know Apple Music don't allow to access audio data. My alternative solution is that playing music and record them. Using AudioUnit, I…
2
votes
2 answers

How to properly run an FFT on a windowed set of data from a pure sine wave

I am trying to experiment with Math.Net, specifically the FFT portion. I am attempting to extract the frequency domain information from a pure sine wave. Here is the code: private void Form1_Load(object sender, EventArgs e) { …
Matthew Goulart
  • 2,873
  • 4
  • 28
  • 63
2
votes
0 answers

matlab / simulink guitar tuner on raspberry pi / FFT

I need to create a guitar tuner with simulink, which is running on the raspberry pi, but i encountered several problems. first of all, i got this code to analyze the frequency of a signal: Fs = 96000; t = linspace(0,1,Fs); x =…
mick
  • 127
  • 2
  • 11
2
votes
1 answer

How do I swap the phase responses of two images?

I applied the FFT to each image. I extracted the angle or phase of both image 1 and 2. After, I would like to swap the phase responses between both images but keep the magnitude intact. The code I have so far…
vincet
  • 917
  • 3
  • 13
  • 26
2
votes
2 answers

Faster way to go from cartesian to polar in C?

My C code for discrete Fourier transform needs to output polar values, amplitude and angle. I have a fast algorithm that outputs cartesian values, x and y. Is there a faster way of converting (f.e. 1024) cartesian values to polar than just: int…
Danijel
  • 8,198
  • 18
  • 69
  • 133
2
votes
2 answers

Waveform Comparison

I am working on a personal research project. My objective is to be able to recognize a sound and identify if it belongs to the IPA or not by comparing it's waveform to a wave form in my data base. I have some skill with Mathematica, SciPy, and…
Nikki
  • 69
  • 1
  • 10