MMACH (lmmach) functions


LIBRARY ROUTINE

lvsymdif - Compares two images pixel by pixel and shows different pixels.

LIBRARY CALL

int
lvsimdif(xvimage *img1, xvimage *img2, xvimage *img3, int mflg, xvimage *img4)

INPUT

none

OUTPUT

none

RETURN VALUE

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

DESCRIPTION

lvsimdif compares two imput images pixel by pixel and shows the pixels that are different. img1 and img2 are the input images. img3 is the gating image, and mflg should be set to 1 if the gating image is to be used. img4 is the output image. Note that img1 or img2 can be used for both input and resulting output xvimage structure, in order to save space. A non-zero mask pixel in img2 enables the output pixel to contain the closing. A zero mask pixel in img2 just transfers the value of the corresponding pixel in img1 to the output pixel.

The input 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

lvsimdif can be defined for all data types supported by khoros, but at the moment it is implemented only for bit and unsigned char images.

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

none

FILES

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

SEE ALSO

lmmach(3)

COPYRIGHT

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