Questions tagged [dft]

Discrete Fourier transform (DFT) is a specific kind of discrete transform, used in Fourier analysis.

Given a sequence of N samples f(n), indexed by n = 0..N-1, the discrete Fourier transform (DFT) is defined as F(k), where k=0..N-1:

Enter image description here

Source: engineeringproductivitytools

428 questions
2
votes
1 answer

2D Fourier Transformation in C

I implemented 2D DFT and IDFT using equation from this site http://homepages.inf.ed.ac.uk/rbf/HIPR2/fourier.htm I think these are correct and nicely explained. Implementation looks like that: for(int i=0;i
Kedriik
  • 331
  • 4
  • 12
2
votes
1 answer

any rules of thumb how to smooth FFT spectrum to prevent artifacts when hand-tweaking?

I've got a FFT magnitude spectrum and I want to create a filter from it that selectively passes periodic noise sources (e.g. sinewave spurs) and zero's out the frequency bins associated with the random background noise. I understand sharp…
ggkmath
  • 4,188
  • 23
  • 72
  • 129
2
votes
1 answer

GSL Fast-Fourier Transform - Non-zero Imaginary for Transformed Gaussian?

As an extension to this question that I asked. The Fourier transform of a real Gaussian is a real Gaussian. Now of course a DFT of a set of points that only resemble a Gaussian will not always be a perfect Gaussian, but it should certainly be close.…
Arturo don Juan
  • 249
  • 2
  • 8
2
votes
2 answers

Matlab, FFT frequency range differences or are they the same?

I'm trying to understand how the FFT in matlab works, particularly, how to define the frequency range to plot it. It happens that I have read from matlab help links and from other discussions here and I think (guess) that I'm confused about it. In…
Gohann
  • 155
  • 1
  • 12
2
votes
2 answers

How to implement/perform DFT on a segment in python?

I am trying to write a simple program in python that will calculate and display DFT output of 1 segment. My signal is 3 seconds long, I want to calculate DFT for every 10ms long segment. Sampling rate is 44100. So one segment is 441 samples…
Dusan J.
  • 303
  • 5
  • 19
2
votes
1 answer

Fourier transform on Green function - Difference between 2 signals almost identical

I am performing FFT with Matlab on the Green function, and I get a strange result that I can't explain. With the definition of Green function (G(r)=-1/(4*pi*r) and taking G(0)=1 to avoid divergence, I am doing two different samplings, one defined on…
user1773603
2
votes
1 answer

IBM ESSL: DFT - Real to complex & Complex to real - Final array bigger than initial one

I have a real 2D double precision array. I want to perform a FFT on it, some operations on the result, and an inverse FFT. I am using IBM ESSL library on Blue Gene Q. The function DRCFT2 is doing the real to complex transform…
user1824346
  • 575
  • 1
  • 6
  • 17
2
votes
0 answers

Android accelerometer frequency domain analysis FFT

I want to create an android app for vibrations analysis using embedded accelerometer, would you suggest an easy solution/library to get a frequency spectrum out of the x,y,z accelerations?
avafab
  • 1,601
  • 3
  • 20
  • 38
2
votes
1 answer

Real FFT output

I have implemented fft into at32ucb series ucontroller using kiss fft library and currently struggling with the output of the fft. My intention is to analyse sound coming from piezo speaker. Currently, the frequency of the sounder is 420Hz which I…
Jin
  • 119
  • 7
2
votes
1 answer

Different result value between openCV DFT and Matlab FFT

I'm trying to convert a simple matlab code doing FFT. The code goes like this: c = fft([y; zeros(N-M, 1)]); Values for N=256, M = 100. Here are the values of y (100 points) that i'm using to…
tarmizi
  • 173
  • 3
  • 18
2
votes
2 answers

how to get the phase of the cosine function from FFT

from DFT relation for cosine function we have DFT( cos(2*pifin) )=.5*( delta(f-fi)+delta(f+fi) ) as we can see the phase of the DFT is zero. However, when I use FFT in matlab, fft coefficients are complex which means the phase of the DFT is not…
user51780
  • 139
  • 2
  • 5
2
votes
2 answers

Frequency axis in a Numpy fft

I have a 32x32 pixels image that I would like to compute the 1D power spectrum (averaged along the y axis of the image). Here's what I do. import numpy as np size_patch=32 # Take the fourier transform of the image. F1_obs =…
user3722235
  • 557
  • 2
  • 6
  • 12
2
votes
2 answers

Filtering in Frequency Domain

I have to apply prewit filter to an image in the frequency domain.Here is the procedure I am following. 1) Convert the NxN matrix of image to 2*Nx2*N matrix by padding zeros 2) Center the image transform by multiplying image with (-1)^(x+y) 3)…
bumpk_sync
  • 95
  • 2
  • 6
2
votes
1 answer

2D Discrete Fourier Transform implementation in MATLAB

I am implementing the 2D Discrete Fourier Transform in Matlab using matrix multiplications. I realize that this can be a separable operation, so I am creating a matrix for 1D DFT and multiplying it with the columns of an input image and then the…
bumpk_sync
  • 95
  • 2
  • 6
2
votes
0 answers

Sub-image Fourier Transform from whole image Fourier Transform

I'm trying to obtain the fourier transform from overlapping blocks of an image, say blocks of 32x32 pixels with overlap of 16 pixels. I do not want to calculate, or at least I want to avoid to calculate, the FT of each block separately. My question…
Kinetix
  • 31
  • 4