Hello guys, I wanted to ask something concerning FFTW 3.1.2 I want to compute a 2D Fourier Transform of a 64x64 array. For research reasons I need to calculate firstly 64 transforms, thus the rows, and then in order to transpose between the two dimensions I NEED to use the strided calls to check their performance. This is what I do: FOR the x dimension ------------------- fftw_plan_many_dft(rank, n, howmany, input, inembed=NULL, istride, idist, output, onembed, ostride=NULL, odist, FFTW_FORWARD, FFTW_MEASURE); where rank=1, n[0]=64, howmany=64, istride=ostride=1, idist=odist=64 and to compute the 2nd dimension I pass as an input the output from above FOR the y dimension ------------------- fftw_plan_many_dft(rank, n, howmany, output, inembed=NULL, istride2, idist2, final, onembed=NULL, ostride2, odist2, FFTW_FORWARD, FFTW_MEASURE); where rank=1, n[0]=64, howmany=64, istride2=ostride2=64, idist2=odist2=1 Any ideas why am I getting this all wrong? From my tests I thing that the wrong arguments are those concerning the stride and dist but they seem correct... Please help Thank you in advance
FFTW 3.1.2 - fftw_plan_many_dft
Started by ●May 18, 2008
Reply by ●May 18, 20082008-05-18
I think the better and faster approach will be to use fft2 function available in octave. Octave is a free equivalent of matlab and can be installed on windows and linux machines. y = fft2(a, m, n); Regards Bharat Pathak Arithos Designs www.Arithos.com DSP Design Consultancy and Training Company.
Reply by ●May 19, 20082008-05-19
"bharat pathak" <bharat@arithos.com> wrote in message news:qY-dnW3XBLSVea3VnZ2dnUVZ_hOdnZ2d@giganews.com...>I think the better and faster approach will be to use fft2 >function > available in octave. Octave is a free equivalent of matlab > and can> be installed on windows and linux machines.^^^^^^^^^^^^^^^^^^^^ Only if you first install Cygwin. For this reason, Octave is a big disappointment and is in no way a replacement for Matlab (or FFTW).
Reply by ●May 19, 20082008-05-19
On May 18, 9:41 pm, "solonas13" <solona...@hotmail.com> wrote:> Hello guys, > > I wanted to ask something concerning FFTW 3.1.2 > I want to compute a 2D Fourier Transform of a 64x64 array. For research > reasons I need to calculate firstly 64 transforms, thus the rows, and then > in order to transpose between the two dimensions I NEED to use the strided > calls to check their performance. This is what I do: > > FOR the x dimension > ------------------- > > fftw_plan_many_dft(rank, n, howmany, input, inembed=NULL, istride, idist, > > output, onembed, ostride=NULL, odist, FFTW_FORWARD, FFTW_MEASURE); > > where rank=1, n[0]=64, howmany=64, istride=ostride=1, idist=odist=64 > > and to compute the 2nd dimension I pass as an input the output from above > > FOR the y dimension > ------------------- > > fftw_plan_many_dft(rank, n, howmany, output, inembed=NULL, istride2, > idist2, final, onembed=NULL, ostride2, odist2, FFTW_FORWARD, > FFTW_MEASURE); > > where rank=1, n[0]=64, howmany=64, istride2=ostride2=64, idist2=odist2=1 > > Any ideas why am I getting this all wrong? From my tests I thing that the > wrong arguments are those concerning the stride and dist but they seem > correct... Please help > > Thank you in advanceThe question that came to my mind is: why not just use FFTW's built-in 2-D transform functionality? It's easier to use than the advanced interface you're working with. At one point I did understand the meaning of all of the arguments (I think the documentation is a bit terse on that topic), but my memory fails me now, so I'm not sure what you might have wrong. fftw_plan fftw_plan_dft_2d(int nx, int ny, fftw_complex *in, fftw_complex *out, int sign, unsigned flags); Jason
Reply by ●May 19, 20082008-05-19