MMACH (lmmach) functions


LIBRARY ROUTINE

lvero - Do the erosion of an image by a structuring element, with an operation gating mask.

LIBRARY CALL

int
lvero(xvimage *img1, mat_str *ker, xvimage *img2, int mflg, unsigned long border, xvimage *img3)

INPUT

none

OUTPUT

none

RETURN VALUE

TRUE (1) on success, FALSE (0) on failure

DESCRIPTION

lvero will do the erosion of an image by a structuring element. img1 and b are, respectively, the input image and the structuring element; img2 is the gating image, and mflg should be set to 1 if the gating image is to be used. A non-zero mask pixel in img2 enables the output pixel to contain the erosion. A zero mask pixel in img2 just transfers the value of the corresponding pixel in img1 to the output pixel.

img3 is the output image. Note that img1 and img3 must point to different image structures. The input, output and mask images must be of the same size, data type, and have the same number of data bands.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

lvero 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. The structuring elements are subsets of the 3x3 matrix and the origin is always at the center of this matrix.

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

Bug fixes and MAT code optimization by Adriano Nagelschmidt Rodrigues & Luiz Fernando Vieira Memory allocated by kmalloc() is now properly unallocated by kfree() - E. Trettel <trettel@fee.unicamp
>

FILES

$MMACH/objects/library/lmmach/src/lvero.c

SEE ALSO

mmach(3)

COPYRIGHT

Copyright (C) 1993-1997 Junior Barrera, Roberto Lotufo. All rights reserved.