Problem using fftw

Started by Vedran Fura─Ź in comp.dsp14 years ago 3 replies

I'm transforming one period of a sawtooth signal: -1, -0.998, -0.996, -0.994, ..., +0.994, +0.996, +0.998. The fftw plan I use is:...

I'm transforming one period of a sawtooth signal: -1, -0.998, -0.996, -0.994, ..., +0.994, +0.996, +0.998. The fftw plan I use is: fftw_plan_dft_r2c_1d(N, in, out, FFTW_ESTIMATE); This is the result that I expect: -0.636sin(x) -0.318sin(2x) -0.212sin(3x) -0.159sin(4x) -0.127sin(5x)... And this is what I get: +0.636sin(x) +0.318sin(2x) +0.212sin(3x) +0.159sin(4x) +0.127sin(5x)... ...


Using FFTW on 64 bit computer Visual Studio 2008

Started by JT in comp.dsp12 years ago

Has anybody been to compile FFTW either dynamically or statically and use it along with Visual Studio 2008 compiler using a 64 bit build? The...

Has anybody been to compile FFTW either dynamically or statically and use it along with Visual Studio 2008 compiler using a 64 bit build? The below program has errors #include "stdafx.h" #include #include "fftw3.h" #pragma comment(lib,"libfftw.lib"); //#include using namespace std; #define N 100 int _tmain(int argc, _TCHAR* argv[]) { fftw_complex *in


FFTW: FFT and IFFT of real data - wrong data after IFFT

Started by Micha80 in comp.dsp16 years ago 3 replies

Hi, I use the FFTW lib to do a FFT and a IFFT of real data. So I declare int len = 32; out1 = (fftw_complex*)...

Hi, I use the FFTW lib to do a FFT and a IFFT of real data. So I declare int len = 32; out1 = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * len); in1 = (double*) malloc(sizeof(double) * len); I initialize the in1 field with 0,1,2,3...len-1 I do the FFT due to the documentation: p_for = fftw_plan_dft_r2c_1d(len, in1, out1, FFTW_FORWARD); fftw_execute(p_for); And now the ...


fftw equivalent soft ware for digital filters

Started by Anonymous in comp.dsp15 years ago

Good Day, Is there any linux software which can help filter design ? IIR/FIR/analog. Thanks Ahmad

Good Day, Is there any linux software which can help filter design ? IIR/FIR/analog. Thanks Ahmad


ifft in C/C++

Started by Parlous in comp.dsp18 years ago 6 replies

I have used FFTW for my fourier operations in the past, but is there a inverse fourier transform library of some sort out there that is just...

I have used FFTW for my fourier operations in the past, but is there a inverse fourier transform library of some sort out there that is just as fast?


1800Hz Detection

Started by O-Zone in comp.dsp17 years ago 2 replies

Hi all, i'm new to DSP so consider that before reply me :-) I have PCM data from a Voice Modem and i need to dectect if is a 1800Hz tone. I...

Hi all, i'm new to DSP so consider that before reply me :-) I have PCM data from a Voice Modem and i need to dectect if is a 1800Hz tone. I think that i need to use FFT (fftw, for precision) but i can't be able to understand nothing. Someone can help me with C code example ? Thanks in advance, Oz


Re: fftw and derivative. once again

Started by Jerry Avins in comp.dsp10 years ago

On Sunday, January 9, 2011 6:52:09 PM UTC-5, Tim Wescott wrote: ... > You're not using any frequency limiting -- are you sure you're not...

On Sunday, January 9, 2011 6:52:09 PM UTC-5, Tim Wescott wrote: ... > You're not using any frequency limiting -- are you sure you're not just > amplifying the heck out of your noise? > > In Scilab: > > --> N = 4096; n = 0:N-1; > > --> nn = pmodulo(n + N/2, N) - N/2; > > --> x = exp(-nn.^2 / 100000); xd = ifft(fft(x) .* (-nn .^ 2)); > > --> clf; plot2d(n, [x' xd']) > > gives


fftshift

Started by Henrietta Denoue in comp.dsp15 years ago 2 replies

Hi Need to do fftshift in 3 dimensions using fftw library but can't find it. Does anyone know if there is a function for this in the above...

Hi Need to do fftshift in 3 dimensions using fftw library but can't find it. Does anyone know if there is a function for this in the above library ? Thanks in advance H.


2D image processing with FFTW

Started by Johannes Bauer in comp.dsp12 years ago 4 replies

Hello group, I'm having some trouble getting my code to work correctly using C++ and libfftw (which is, may I remark, absolutely marvellous)....

Hello group, I'm having some trouble getting my code to work correctly using C++ and libfftw (which is, may I remark, absolutely marvellous). Basically I'm FFTing a picture (real to complex) and then performing and IFFT (just to see if everything works as expected). Well, it does not - I'm having some really stupid problem with which I now spent half a day. Can't figure out what I'm doing ...


Good Wiener filter implementation in C/C++?

Started by Paul Miller in comp.dsp16 years ago 6 replies

I've been looking for a modern, efficient Wiener filter implementation written in C or C++, and I can't find anything very recent (or one...

I've been looking for a modern, efficient Wiener filter implementation written in C or C++, and I can't find anything very recent (or one that actually works). I'd like one implemented on top of fftw if possible. Anyone got any pointers to one?


Flicker detection with DFT Problem

Started by erenay in comp.dsp14 years ago 1 reply

Hello Everybody, I'm not very experienced with DFT and FFTW library and I want to ask your opinion about the results I get. My aim is to...

Hello Everybody, I'm not very experienced with DFT and FFTW library and I want to ask your opinion about the results I get. My aim is to determine if the sample input sequence is flickering with some frequency. In my project, I'm capturing frames from a video and geting the mean pixel value of some pixels with a certain property. I get one mean value for each frame. I want to check if these...


PSOLA -- changes in duration

Started by Himanshu in comp.dsp16 years ago 6 replies

Hi all! Greetings! I was working on pitching shifting for quite sometime. I used Mr. Bernsee's code for that purpose, modified it to use...

Hi all! Greetings! I was working on pitching shifting for quite sometime. I used Mr. Bernsee's code for that purpose, modified it to use fftw and tweaked a little to bring its response time down, not much but by 7 seconds. But I am still not able to use it for real-time processing. The listing spends 98% of its time performing in-out transforms to frequency domain. So I thought about sw...


FFT Rounding error?

Started by Andrew Holme in comp.dsp14 years ago 48 replies

I computed this forward FFT using MS VC++ 6.0 and FFTW: http://www.holmea.demon.co.uk/Misc/FFT.gif I don't think the "tail" should flick up...

I computed this forward FFT using MS VC++ 6.0 and FFTW: http://www.holmea.demon.co.uk/Misc/FFT.gif I don't think the "tail" should flick up like that at the low-frequency end. Is this caused by a lack of floating-point precision? TIA


Seeking Free Frequency analysis toolkit or examples

Started by David Chen in comp.dsp18 years ago 5 replies

Hi, I'm currently a 17-year-old student trying to do a project, involving embedding data within an audio file. Hopefully, it will survive...

Hi, I'm currently a 17-year-old student trying to do a project, involving embedding data within an audio file. Hopefully, it will survive MP3 compression... so I've come to the conclusion I will have to convert all the samples to the freq. domain to do any analysis. I downloaded FFTW and I have it working, but it assumes that the user knows what he's doing (which I do not really). I f...


fftw3.1 static library on win64

Started by Jason in comp.dsp15 years ago

Hi, I am trying to locate an appropriate forum to discuss compiling fftw on a 64 bit pc for use with MS Visual Studio 2005. I am able to...

Hi, I am trying to locate an appropriate forum to discuss compiling fftw on a 64 bit pc for use with MS Visual Studio 2005. I am able to build a library after making modifications to config.h but when I run a very simple test program I get memory leaks. If there is any interest, I am willing to post more information. Thank you. Jason


Re: fftw and derivative. once again

Started by Jerry Avins in comp.dsp10 years ago

Yes. The -om^2 must be a mistake. Whatever, it's not enough to simply fidoodle the amplitudes. In addition, the phases have to be advanced by 90...

Yes. The -om^2 must be a mistake. Whatever, it's not enough to simply fidoodle the amplitudes. In addition, the phases have to be advanced by 90 degrees, and that implies a different delay for each spectral line. I have an intuitive feel for what the time derivative of a discrete sequence means, but I'm glad that I don't have to deliver a mathematical definition. Jerry


fftw 1D transform of 2D signal

Started by Nico in comp.dsp13 years ago 1 reply

Hello, I have a 2D signal (x,y) in an array, and I would like to fourier transform it along one and only one dimension, x for example. I...

Hello, I have a 2D signal (x,y) in an array, and I would like to fourier transform it along one and only one dimension, x for example. I have (nx+1) and (ny+1) points in the x and y direction respectively. the data is stored in a 1D array so that the (i,j) point is simply i + j*(nx+1) I think that the advanced interface should be good for my problem, but I don't understand ...


fftw_plan_dft_1d V.S. fftw_plan_dft_r2c_1d

Started by Merrr in comp.dsp14 years ago 1 reply

hi, I'm using FFTW library for a Convolution Reverb application. Right now I'm using the fftw_plan_dft_1d function to plan my dfts. Later on I...

hi, I'm using FFTW library for a Convolution Reverb application. Right now I'm using the fftw_plan_dft_1d function to plan my dfts. Later on I tried using the fftw_plan_dft_r2c_1d. I was expecting to get the same result, but the results are different. Is my expectation wrong? Or do I have to overlook my code? These are the lines I use for the planning part p1 = fftw_plan_dft_1d(BLOCK_SIZE ...


DCT derivative

Started by sasidhar in comp.dsp12 years ago 9 replies

Hi all, I am trying to calculate derivatives of chebyshev coefficients using FFTW for cosine(x). However I am not getting back the right values...

Hi all, I am trying to calculate derivatives of chebyshev coefficients using FFTW for cosine(x). However I am not getting back the right values when I perform inverse chebyshev transform. Can anyone check the code below and tell me the possible errors. Thank you. program test implicit none #include "fftw3.f" INTEGER, PARAMETER :: N=4 INTEGER(8) :: plan ...


Correlation of 2 Sequences using FFT (W/W.O FFTW)

Started by Ramoj Paruchuri in comp.dsp17 years ago 16 replies

Hi All, I am very much excited to see that this group answers almost all the doubts. But I have some trivial yet confusing...

Hi All, I am very much excited to see that this group answers almost all the doubts. But I have some trivial yet confusing doubts. Situation/Objective: Correlating 2 Sequences -- S = {s1,s2,s3,...sN} and C = {c1,c2,c3,....cM} where S and C are 2 discrete set of points one of length N and one of length M (say, M> N). We do not know anything about their periodicity or any other propertie