RETRO (vipl) functions
LIBRARY ROUTINE
lvdetilt - Remove an illumination gradient from an image by subtracting a best-fit plane.
LIBRARY CALL
int lvdetilt(
xvimage *img1,
xvimage *img2,
int mflg,
int pflg)
INPUT
- img1 - input/output image structure
- img2 - gating mask image
- mflg - a flag set (equal 1) if gating image mask available
The input images must be of the same data type and size.
OUTPUT
- img1 - holds the result of the detilt operation. The
output data type is the same as the input data type.
RETURN VALUE
TRUE (1) on success, FALSE (0) on failure
DESCRIPTION
lvdetilt computes the best-fit plane for an image,
and then subtracts that plane from the image to
produce the output. This is very handy for correcting
illumination gradients in a poorly digitized image.
The pflg also removes the mean from the image, giving
it zero-mean statistics.
The mask image must be of the same data type as the
input images, and is used to gate the operation. A
non-zero mask pixel enables the output pixel to contain
the adjusted value. A zero mask pixel just transfers
the value of the corresponding pixel in the input image
to the output pixel.
img1 is the input image and img2 is the operation
gating image. mflg should be set to one if the gating
image is to be used. img1 is used for both the input
xvimage structure and the output result xvimage structure.
This is done to save space, but you must be careful not
to overwrite important data.
The mask image must be the same size as the input images.
The output image data type is the same as the input
image data type.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
lvdetilt will not work on BIT, transform or COMPLEX data
storage types.
MODIFICATION
John Rasure, Marcelo Teran, Ron E. Neher
Mon Jun 11 15:59:36 MDT 1990 Donna Koechner - updated to
ghostwriter
Wed Mar 20 12:36:43 MET 1991 Jean Pierre Guerin - Fixed
incorrect tilt center
point calculation
26-Sep-91 Scott Wilson - Fixed undocumented change in the lib
source (not recorded in vdetilt.prog)
that had incorrect checks for the
successful completion of the tilt
computation routines. For the float
case, success was incorrectly detected
as failure, resulting in bogus error
messages and premature termination of
the routine.
FILES
$RETRO/objects/library/vipl/src/lvdetilt.c
SEE ALSO
vipl(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.