MMACH (lmmach) functions
LIBRARY ROUTINE
lvmorphgrad - Do the morphological gradient of an image.
LIBRARY CALL
int
lvgradm(xvimage *img1, mat_str *b, xvimage *img2, int mflg, unsigned long border, xvimage *img3)
INPUT
none
OUTPUT
none
RETURN VALUE
TRUE (1) on success, FALSE (0) on failure
DESCRIPTION
vgradm
will do the morphological gradient of an image.
img1 is the input images; img2 is the gating image;
mflg is a flag. mflg should be set to 1 if the gating image is to be used. img3 is the output image.
A non-zero mask pixel in img2 enables the output pixel to contain
the result. A zero mask pixel in img2 just transfers the value
of the corresponding pixel in img1 to the output pixel.
The input, output and the optional mask images must be of the same size
and have the same number of data bands. The image img1 is used also to
return the result.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
lvgradm
can be defined for all data types supported by Khoros, but at the moment it has been implemented just for the bit and unsigned char types.
Due to the simultaneous processing of 32 pixels in BIT images, input images of the BIT data type must be converted to a special data structure before the library is called. This can be accomplished by using the format routine. After the library call, the unformat routine can convert the image back to the BIT data type.
MODIFICATION
Luiz Fernando Vieira, Adriano Nagelschmidt Rodrigues: port to new toolbox version.
FILES
$MMACH/objects/library/lmmach/src/lvmorphgrad.c
SEE ALSO
lmmach(3)
COPYRIGHT
Copyright (C) 1993-1997 Junior Barrera, Roberto Lotufo. All rights reserved.