.TH IM_THRESH 3 "26 April 1991" .SH NAME im_thresh, im_slice \- threshold an image .SH SYNOPSIS #include int im_thresh(in, out, threshold) .br IMAGE *in, *out; .br double threshold; int im_slice(in, out, threshold1, threshold2) .br IMAGE *in, *out; .br double threshold1, threshold2; .SH DESCRIPTION These functions have been replaced with the relational and boolean packages - see .B im_lessconst() and .B im_and() for much better ways of doing this. These functions operate on any non-complex input. The output image is a unsigned char image with the same sizes and the same number of channels as input. im_slice() thresholds the image held by image descriptor in and writes the result on the image descriptor out. Output is a byte image with values less than threshold1) set to 0, values in [threshold1, threshold2) set to 128 and values greater than threshold2 set to 255 (x in range [a,b) means a<=x