fft2d

[ XITE Reference Manual | XITE home ]

Name

fft2d, fft - Two dimensional Fourier Transform

Syntax

 #include <xite/fft.h>

 int fft2d( IBAND in_band, IBAND out_band,
    int inverse, double scale );

Description

Discrete Fourier Transform.

If inverse = FALSE (0), a forward transform is performed, otherwise an inverse transform is performed.

scale is used to scale the output image. Set scale to 1.0 if you don't want scaling. Set scale to 0.0 if you want standard scaling (1/(xsize*ysize) in forward transform and no scaling in inverse transform).

The forward and inverse discrete Fourier transforms with standard scaling are given respectively as:


           1    M   N          -j*2*pi*(ux/M + vy/N)
 F(u,v) = ---  Sum Sum f(x,y) e
          M*N  x=0 y=0

           M   N          j*2*pi*(ux/M + vy/N)
 f(x,y) = Sum Sum F(u,v) e
          u=0 v=0

where M=Ixsize(f), N=Iysize(f).

Restrictions

in_band and out_band must be of the same size and type Icomplex_typ. Horizontal and vertical band size must be powers of two.

Return value

 0 - ok
 1 - Bad pixel type
 2 - Bad size

See also

fft2d(1), fftMagPhase(1), absValue(3), power(3), phase(3), real(3), imag(3), multiply(3)

Author

Otto Milvang