superutsav

10th April 2006, 10:33

Hi

I have a question regarding the way the data is stored in a 2d fourier transform. I am using a fftw_plan_dft_r2c_2d transform, and here is my question:

From what i understand of 2d fourier transforms, the dc component lies in the centre of the transform, i.e. for a transform of size (nx,ny), the dc component would be at value (nx/2,ny/2).

The fftw_plan_dft_r2c_2d transform returns a matrix of size (nx,ny/2+1). The dc component of this matrix is the value (0,0).

So my question is, which part of the complete 2d fourier transform is reflected in the matrix? In other words, how do I obtain the actual 2d fourier transform from the (nx,ny/2+1) sized matrix i am getting by using the plan? I want to know this so i can design a filter for the same.

With best regards,

superutsav

P.S. If anyone here could give me example code of image filter usage with fftw libraries i would be really grateful

I have a question regarding the way the data is stored in a 2d fourier transform. I am using a fftw_plan_dft_r2c_2d transform, and here is my question:

From what i understand of 2d fourier transforms, the dc component lies in the centre of the transform, i.e. for a transform of size (nx,ny), the dc component would be at value (nx/2,ny/2).

The fftw_plan_dft_r2c_2d transform returns a matrix of size (nx,ny/2+1). The dc component of this matrix is the value (0,0).

So my question is, which part of the complete 2d fourier transform is reflected in the matrix? In other words, how do I obtain the actual 2d fourier transform from the (nx,ny/2+1) sized matrix i am getting by using the plan? I want to know this so i can design a filter for the same.

With best regards,

superutsav

P.S. If anyone here could give me example code of image filter usage with fftw libraries i would be really grateful