vthresh(1)

PROGRAM
vthresh - Create a binary image by applying upper and lower thresholds to an input image.

SYNTAX

vthresh

-i  input image

-o  output image

[-l]
    lower threshold value

[-u]
    upper threshold value

[-v]
    specifies the non-zero pixel output value

[-V]
    Gives the version for vthresh

[-U]
    Gives the usage for vthresh

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called vthresh.ans or file1

[-a [file1]]
    Uses vthresh.ans or file1 as the answer file

DESCRIPTION
vthresh generates a binary image by thresholding the input image. The result image is of the same data type as the input image. The output pixel is given the specified non-zero value if: 1) only the -l flag is given and the pixel value is larger than the lower threshold, 2) only the -u flag is given and the pixel value is less than the upper threshold, 3) the -u and -l flags are given and the pixel value is between the upper and lower threshold, or 4) same as 3) but both thresholds are equal and the pixel value is same as the threshold level. Otherwise, the output pixel is given a zero value.

An image produced by vthresh is very handy for use as a mask image for one of the other arithmetic routines. Note that this type of image is NOT a Khoros BIT image! The output image is of the data type of the input image, but the only pixel values are 0 and non-zero.

By choosing the appropriate limits it is possible to iden- tify areas in an image that are above or below a certain value, or to isolate certain bands of intensities.

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image

-o  type: outfile
    desc: output image

OPTIONAL ARGUMENTS

-l  type: float
    desc: lower threshold value
    default: 128
    bounds: no range checking

-u  type: float
    desc: upper threshold value
    default: 255
    bounds: no range checking

-v  type: float
    desc: specifies the non-zero pixel output value
    default: 255
    bounds: no range checking

EXAMPLES
vthresh -i feath.xv -l 128 -u 202 -v 12 -o thresh.out.xv

causes all pixels between the values on 128 and 202 (inclusively) to have a value of 12 in the output image. All other output image pixels have the value of zero.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvthresh(3)

RESTRICTIONS
vthresh does not operate in BIT images.

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.