RETRO commands


PROGRAM NAME

vgamth - Generate a Binary Image by Thresholding a Color Image (K1)

DESCRIPTION

vgamth generates a binary image by thresholding a pseudo color input image. The result image is of data type BYTE, and the input image must also be of type BYTE.

The output pixel is given the specified value if: 1) only the lower value option is given and the pixel value is larger then the lower threshold, 2) only the upper value option is given and the pixel value is less than the upper threshold, 3) the upper value and lower value options 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.

The input image must contain a map with three columns The thresholding is actually performed on the maps; thus the input image must have a map scheme of FORCE, and the map data type must be BYTE.

By choosing the appropriate limits is it possible to identify areas in an image that are above or below a certain value, or to isolate certain bands of intensities in each color map. There are many different combinations that can be used to produce the results required.

Note that this type of image is NOT a Khoros BIT image! The output image is of the data type BYTE, but the only pixel values are 0 and non-zero.

REQUIRED ARGUMENTS

-i
type: infile
desc: input image
-o
type: outfile
desc: resulting image

OPTIONAL ARGUMENTS

-b
type: integer
desc: high threshold for map column 1
default: 128
bounds: 0 < [-b] < 255
-c
type: integer
desc: low threshold for map column 1
default: 128
bounds: 0 < [-c] < 255
-d
type: integer
desc: high threshold for map column 2
default: 128
bounds: 0 < [-d] < 255
-e
type: integer
desc: low threshold for map column 2
default: 128
bounds: 0 < [-e] < 255
-f
type: integer
desc: high threshold for map column 3
default: 128
bounds: 0 < [-f] < 255
-g
type: integer
desc: low threshold for map column 3
default: 128
bounds: 0 < [-g] < 255
-v
type: integer
desc: non-zero output value
default: 128
bounds: 0 < [-v] < 255

EXAMPLES

vgamth -i input.image -o output.image -b 125 -c 75 -d 125 -e 75 -f 125 -g 75
-v 100

This command performs a threshold on input.image and stores the result in output.image. All pixel values between 75 and 125 are given the value 100 in the output image. All pixel values that do not fall within this range are give the value 0.

SEE ALSO

RESTRICTIONS

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

REFERENCES

COPYRIGHT

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