fftMagPhase

[ XITE Reference Manual | XITE home ]

Name

fftMagPhase - 2D Fourier transform and conversion into magnitude and phase

Syntax

fftMagPhase [<option>...] <inimage> <outimage> [<outimage>]

Description

2D Fourier transform of BIFF image followed by conversion to linear or logarithmic (decibels) magnitude and/or phase in radians. The logarithmic mapping of magnitude is according to

 out_pix = (log(eps + |in_pix|) + offset) * scale
 out_pix = MAX(out_pix, minimum)

Options

-fftscale scale
Scaling of FFT. Default is 1/(xsize*ysize) for forward transform, 1.0 for inverse transform.

-p
Only phase output. Default: Phase and logarithmic magnitude.

-m
Only magnitude (linear or logarithmic) output. Default: Phase and logarithmic magnitude.

-lin
Linear magnitude. Default: Logarithmic.

-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.

-scale scale
Default value: 20.0.

-eps eps
Default value: 1 / (10 * xsize * ysize)

-offset offset
Default value: -log(eps)

-min minimum
Lower limit for resulting logarithmic magnitude values. Values below minimum will be set equal to minimum. Default: No lower limit.

See also

fft2d(1), logarithm(1), phase(1)

Restrictions

Not pixeltype double complex for bands in inimage, unless option -r is used.

Return value

 0 => Ok
 1 => Bad number of arguments
 2 => Could not read input image
 3 => Error in fft routine
 4 => Error in absValue routine
 5 => Error in logarithm routine
 6 => Error in shift_band routine
 7 => Error in phase routine

Author

Svein Bøe, BLAB, Ifi, UiO

Id

$Id: fftMagPhase.c,v 1.8 1997/03/17 13:43:30 svein Exp $