NAME

fft_2d -- 2d Fast Fourier Transform

PROTOTYPE

unitptr fft_2d( int iDx, int iDy, int iType, int iPre, int iDir, unitptr uHost)

ARGUMENTS

int iDx
Image width
int iDy
Image height
int iType
Input data (0=real, 1=complex)
int iPre
Preprossesing (0=Zero Padding, 1=Hamming window, 2=Edge extension)
int iDir
Direction of transform (0=forward)
unitptr uHost
Host unit

RETURN VALUE:

A pointer to the created unit or NULL in the case of an error.

INTERFACE OF CREATED UNIT:

X_in[iDx*iDy]:
(packed input field 0) real input image (for iType=0)
Y_in[2*iDx*iDy]:
(packed input field 1) complex input image (for iType=1)
X_out[2*iFFTx*iFFTy]:
(packed output field 0) complex FFT of image data

DESCRIPTION:

Computes the Fourier transform of a real or complex input image. The input data is row-wise organized (first element corresponds to leftmost lower corner of the image). If the input data is complex it is organized as real[0] complex[0] ... real[n] complex[n]. The dimensions of the input image do not necessarily have to be an exact power of 2. The dimensons of the output data on the other hand are expanded to a power of 2. Depending on the iPre argument the input data is preprocessed as followed:
iPre = 0
Zero Padding of input data
iPre = 1
input data is windowed with Hamming window
iPre = 2
the input image will be extended to the borders in such a way that there will be as less discontinuities as possible.
Depending on iDir either a forward (iDir=0) or inverse (iDir=1) transform is performed. The output field contains the complex transform data of the image in the same order as described above. Note: To perform 1 dimensional FFTs, specify iDy=1.

STATUS:

preliminary

SEE ALSO:

power_spec

FILE

nst_fft2d.cc