RETRO (vipl) functions


LIBRARY ROUTINE

lvgamth - Generate a binary image (value or 0) by thresholding the input image

LIBRARY CALL

/* ARGS_USED */
int lvgamth(
	xvimage *image,
	int rupper,
	int rlower,
	int gupper,
	int glower,
	int bupper,
	int blower,
        int lrflag,
	int urflag,
	int lgflag,
	int ugflag,
	int lbflag,
	int ubflag,
	int vflag,
	int value)

INPUT

OUTPUT

RETURN VALUE

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

DESCRIPTION

Generate a binary image (value or 0) by thresholding the input color image. A color image implies the Image is of data type BYTE, It contains 3 map columns of data type BYTE with Map enable set to FORCE. The resulting image is of data type BYTE.

The output pixel is given the value specified by the input variable value, if the input pixel has a value above the lower threshold, below the upper threshold, or between the two threshold levels.

If the lower threshold flag is set then any pixel with value larger than the lower threshold is set to true, otherwise false. If the upper threshold flag is set then any pixel with value larger than the upper threshold level is set to false, otherwise true. If both flags are set then it is possible to isolate a band of pixel values. If the lower and upper threshold flags are set and the lower and upper threshold values are equal, then the output is set to true if it is exactly equal to the threshold level. The region specified by the upper and lower threshold values must be true for colormap #1 , colormap #2 and colormap #3 pixel values for the above to work.

ADDITIONAL INFORMATION

none

EXAMPLES

none

SIDE EFFECTS

none

RESTRICTIONS

lvgamth will only operate on 1 band images of data type BYTE, with the map enable FORCE, and map data type BYTE.

MODIFICATION

none

FILES

$RETRO/objects/library/vipl/src/lvgamth.c

SEE ALSO

vipl(3)

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.