LIBRARY ROUTINE
lifiltdesign - generate 2-dimensional frequency filter
LIBRARY CALL
int
lifiltdesign(
int type,
int brand,
int order,
int image_height,
int image_width,
double lower_cutoff,
double upper_cutoff,
double epsilon,
int centered,
kobject freq_image)
INPUT
- type - type of filter.
- brand - brand of filter.
- order - filter order.
- image_height - height of the image in pixels.
- image_width - width of the image in pixels.
- lower_cutoff - lower cutoff for band pass or band stop,
and cutoff for high pass filters, expressed in
fraction of Nyquist.
- upper_cutoff - upper cutoff for band pass or band stop,
and cutoff for low pass filters, expressed in
fraction of Nyquist.
- epsilon - Chebyshev parameter to control the ripple in
the passband or stopband.
- centered - if TRUE, it puts low frequencies in the center
of the image. Otherwise it puts them in the
corners.
OUTPUT
- freq_image - An open kobject in which to store the filter
image
RETURN VALUE
TRUE (1) on success, FALSE (0) on failure
DESCRIPTION
This routine generates a spatial frequency image of real values
(zero phase) that represent the magnitude response of the
requested filter type and brand. The filter types
are are: lowpass, highpass, bandpass, and bandstop. The
function brands are: ideal, Butterworth, Gaussian, Chebyshev I,
and Chebyshev II.
The output is symmetric across a diameter through the origin
of the image; the origin can be either the center of the image
or the top left corner of the image. Cutoff frequencies are
normalized to the Nyquist frequency, thus implying that 0
corresponds to DC and 1.0 corresponds to the Nyquist frequency.
Note that the number of pixels between DC and Nyquist is
given by the image_width/2 in the width direction and
image_height/2 in the height direction. This means that if
you ask for a non-square image you will get a non-circularly
symmetric image passband in the output. This occurs because
it is assumed that the frequency sampling interval is the same
in both directions.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$IMAGE/objects/library/kimage_proc/src/lifiltdesign.c
SEE ALSO
kimage_proc(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.