fft

Using FFT in Android

扶醉桌前 提交于 2019-12-12 04:14:57
问题 I am having trouble understanding how I should pass PCM data from the mic to this FFT class I am using made by Piotr Wendykier (it's the DoubleFFT_1D class in JTransforms). I think I have to return a real and imaginary number and then double the real number to eventually obtain Frequency = 8000 * i / 1024 where i is the index of the highest magnitude. Can someone help me in finding the frequency of a note played in? I have a recording class as follows: import edu.emory.mathcs.jtransforms.fft

FFT and PSD of current signal and analysis

无人久伴 提交于 2019-12-12 03:54:02
问题 I have a current signal which I obtained from cadence simulation over 30ns time but my current actually varies (which I call active region) over certain period. I extracted the data of current signal over 1ps fixed step and plotted the current. Then to analyze frequency spectrum and powers spectral density I used FFT and PSD in MATLAB. But I am confused about what this analyse mean and how can realize it. The operation frequency of my circuit is 2GHz. So my goal is to see the frequency

Reading out the direction and frequency of a point in the Matlab 2D DFT fft2() function

和自甴很熟 提交于 2019-12-12 03:39:55
问题 I am getting familiarized with Matlab and the function fft2() . In this toy example, I am aiming at producing the 2D DFT of the following 256 x 256 png image: To be able to understand the output easily, I try to convert this image into a 256 x 256 image, eliminating color information: Im = imread('circ.png'); pkg load image Im = rgb2gray(Im); figure, imshow(Im) After this bookkeeping preliminaries I run: A = fft2(double(Im)); A is a 256 x 256 matrix from which amplitude and phase can be

phase correlation for image stitching (using of Hamming Window)

空扰寡人 提交于 2019-12-12 03:14:35
问题 I use phase correlation for image stitching and it gives good results for most part of my test data. I just stitiching pairs of image left-right and top-bottom(only shift) But there is some strange behaviour. First strange coordinates, I must convert coordinates //if L-R pt.x= src->width-maxloc.x; pt.y= src->height-maxloc.y; if(pt.y>(temp->height/2)) pt.y= -(maxloc.y+1); //if T-B pt.x= src->width-maxloc.x; pt.y= src->height-maxloc.y; if(pt.x>(temp->width/2)) pt.x= -(maxloc.x+1); Then usage of

Numpy fft.pack vs FFTW vs Implement DFT on your own

狂风中的少年 提交于 2019-12-12 03:06:58
问题 I am currently need to run FFT on 1024 sample points signal. So far I have implementing my own DFT algorithm in python, but it is very slow. If I use the NUMPY fftpack, or even move to C++ and use FFTW, do you guys think it would be better? 回答1: If you are implementing the DFFT entirely within Python, your code will run orders of magnitude slower than either package you mentioned. Not just because those libraries are written in much lower-level languages, but also (FFTW in particular) they

error in using fftoneside

泄露秘密 提交于 2019-12-12 02:46:23
问题 Hi I'm trying to calculate mfcc for which i'm windowing. I have seen this one post I'm getting error in fftOneSide. my code is waveFile='test_preEmphasis.wav'; [y, fs]=wavread(waveFile); n=512; t=(1:n)'/fs; startIndex=30418; endIndex=startIndex+n-1; original=y(startIndex:endIndex); windowed=original.*hamming(n); [mag1, phase1, freq1]=fftOneSide(original, fs); [mag2, phase2, freq2]=fftOneSide(windowed, fs); subplot(3,2,1); plot(original); grid on; axis([-inf inf -1 1]); title('Original signal'

Web audio analyser node - run at regular interval

人走茶凉 提交于 2019-12-12 02:27:55
问题 I want to detect an audio signal (morse code) on specific frequencies using web audio. I retrieve the frequency data using an analyser node's getFloatFrequencyData function. Now the problem: Using setInterval() to regularly sample the frequency data is not regular enough: the callback gets executed a few milliseconds earlier or later than expected. How can I retrieve the analyser's frequency data regularly exactly every few miliseconds? I would prefer using the built-in analyser node's FFT

Using FFTWLib (C#): Cannot find libfftw3-3.dll

╄→гoц情女王★ 提交于 2019-12-12 02:13:05
问题 I'm trying to use Tamas Szalay's C# port of FFTW in Visual C# 2010, and I'm getting the above error when I try to use a function from FFTW (in this case fftw.malloc). That error goes away if I manually move the dll into the project's /bin/debug/ folder, but then I get An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B) Method: IntPtr malloc(Int32) which makes me think I have a deeper problem. Possibly relevant: I'm running this on an x64

How to calcuate the energy spectrum of a signal?

时光毁灭记忆、已成空白 提交于 2019-12-12 02:02:55
问题 I know by theory that the energy spectrum of a given signal is the sum of the squared fourier coefficient . What if I have the real and imaginary part of the corresponding fourier coefficient, can I say that energy spectrum of a given signal is equal to sum of (real part + imaginary part)^2 I hope that is straightforward what Im trying to say?! best regards ben 回答1: Not quite. You want: sum of fft_result_magnitudes^2 which is: sum of (sqrt(real_part^2 + imaginary_part^2)^2 which is: sum of

How to plot a 3d graph of 2d fft transformations with a changing parameter

社会主义新天地 提交于 2019-12-12 01:51:42
问题 I want to make a 3d plot of 2d plots of function y where y is the dft of function z with having as axis k(x) w0(y) and amplitude(y)(z), where k is the dft variable in frequency domain and w0 is a changing parameter between 0 and 4*pi/45. n=(0:255); x1 = exp(n.*(w1*1j)); x2 = 0.8.*exp(n*((w2-w0)).*1j); z =hamming(256)*(x1+x2); y = fft(abs(z)) 回答1: If I'm interpreting your question properly, you wish to have something like this: The x axis is the DFT number, the y axis is a parameter that