MMACH (lmmach) functions
LIBRARY ROUTINE
lvtoggle - Do the toggle between two images pixel by pixel with an operation gating mask.
LIBRARY CALL
int
lvtoggle(xvimage *img1, xvimage *img2, xvimage *img3, xvimage *img4, int mflg, xvimage *img5)
INPUT
none
OUTPUT
none
RETURN VALUE
TRUE (1) on success, FALSE (0) on failure
DESCRIPTION
vtoggle
will do the toggle between two images pixel by pixel.
Let p1, p2 and p3 be the corresponding pixels, respectively, in images
1, 2 and 3. The pixel p2 is chosen if |p1 - p2| < |p1 - p3|, otherwise
the pixel p3 is chosen.
img1 is the input image; img2 and img3 are the toggle options; img4 is the gating image, and mflg should be set to 1 if the gating image is to be used. img5 is the output image. Note that img1 or img2 can be used for both the input and the resulting output xvimage structure, in order to save space.
A non-zero mask pixel in img4 enables the output pixel to contain
the sup. A zero mask pixel in img4 just transfers the value
of the corresponding pixel in img1 to the output pixel.
The input images must be of the same size, data type, and have
the same number of data bands, as must the optional mask image.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
lvtoggle
can be defined for all data types (except bit) supported by Khoros, but at the moment it has been implemented just for unsigned char type.
MODIFICATION
Port to new toolbox version: Luiz Fernando Vieira, Adriano Nagelschmidt Rodrigues
FILES
$MMACH/objects/library/lmmach/src/lvtoggle.c
SEE ALSO
mmach(3)
COPYRIGHT
Copyright (C) 1993-1997 Junior Barrera, Roberto Lotufo. All rights reserved.