fft2d
[ XITE Reference Manual | XITE home ]
Name
fft2d - Two dimensional Fourier Transform
Syntax
fft2d [<option>...] <inimage> <outimage>
Description
fft2d performs a 2 dimensional Fourier transform.
If inimage is of another pixeltype than single precision
complex, inimage will be converted to single precision
complex. When inimage is double precision complex, this
is only allowed when using option -r below.
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
Horizontal and vertical image size must be powers of two.
Options
-
-i
- Inverse Fourier transform.
-
-s scale, -fftscale scale
- The output image is multiplied by scale. Default scale is
1/(xsize*ysize) for forward transform and 1.0 for inverse
transform.
-
-b
- Pixeltype for outimage will be unsigned byte, through
conversion of the result. Values outside the range of unsigned
byte will be limited to the min/max values for unsigned byte.
Default: Complex.
-
-r
- Allow pixeltype of inimage to be double complex. Convert
image to pixeltype complex before applying the Fourier
transform.
Default: Allow only single-precision complex or non-complex
pixeltype for inimage, not double complex. Convert the
image to pixeltype complex before applying the Fourier
transform.
Return value
0 - ok
1 - error
See also
fft2d(3), absValue(1), power(1), phase(1), real(1), imag(1),
fftMagPhase(1), multiply(1)
Author
Otto Milvang
Id
$Id: fft2d.c,v 1.34 1997/05/25 11:55:32 svein Exp $