threshold
[ XITE Reference Manual | XITE home ]
Name
threshold - threshold an image with specified threshold
Syntax
threshold [-l <lpv>] [-h <hpv>] \
<input image> <output image> <threshold>
Description
threshold thresholds an image. Pixels below or
equal to threshold is set to lpv (low pixel value),
pixels above threshold are set to hpv. Default values
0 and 255 can be modified with the -l and -h
switches.
if (old_pixel_value LE threshold) new_pixel_value = lpv
else new_pixel_value = hpv;
Restrictions
Acepts only UNS_BYTE pixels.
Author
Tor Lønnestad, BLAB, IfI, UiO
Examples
threshold mona.img monath.img 110
threshold -h 1 mona.img monath.img 150
threshold -l 255 -h 0 mona.img monath.img 127
Id
$Id: threshold.c,v 1.26 1996/11/08 14:06:13 svein Exp $