SYNOPSISvop -op op [-option ...] [infile] [outfile]
DESCRIPTIONvop performs arithmetic and logical operations on image pixels. It has three modes:
- It can perform a unary (single-operand) operation on each pixel of an input image.
- It can perform a binary (two-operand) operation between each pixel of an input image and a scalar value.
- It can perform a binary (two-operand) operation between each pixel of an input image and the corresponding pixel of a second image.
When the operation is a binary one between two images (case 3, above), the second input comes from a separate file, and it may have...
...the same number of bands as the first input image, in which case band i of the output image is formed from band i of both input image; or
...a single band, in which case band i of the output image is formed from band i of the first input image and band 0 of the second.
By means of the -min and -max options, you can specify bounds for clipping output pixel values.
COMMAND LINE OPTIONSvop accepts the following options:
- Prints a message describing options.
- -in infile
- Specifies a Vista data file containing the input images. These images serve as the first operand of a binary operation, or the only operand of a unary one.
- -out outfile
- Specifies where to write the output images as a Vista data file.
- -op op
Specifies the operation as one of the following, described here in terms of
operands u and v:
abs absolute value of u exp exponential function e ** u log natural logarithm log (u) not negation ! u sqrt square root of u square u * u add u + v and u & v dist absolute value of ( u - v ) div u / v max max (u, v) min min (u, v) mult u * v or u | v sub u - v xor u ^ v
- -value number
- Specifies a scalar constant to be used as the second operand of a binary operation.
- -image imagefile
- Specifies a Vista data file containing a single image to serve as the second operand of a binary operation.
- -min number
- Sets a lower bound for clipping output pixel values. Default: the minimum value that can be represented by an output pixel.
- -max number
- Sets an upper bound for clipping output pixel values. Default: the maximum value that can be represented by an output pixel.
When -op specifies a binary operation, either -image or -value must be specified.
Input and output files can be specified on the command line or allowed to default to the standard input and output streams.
NOTESThe and, or, and xor operations can only be performed with images having integer pixel representations (not float or double).
A floating point result (such as what exp produces) is rounded to the nearest integer for storing in an integer output pixel.
Clipping of output pixel values and arithmetic exceptions are reported by means of warning messages.
BUGSIf vop is built under Solaris 2.x using the unbundled Sun C compiler, an integer division by zero is flagged as a fatal error. This is done because of a SunOS bug that causes those exceptions to repeat indefinitely (see BUGS on the SunOS 5.2 ieee_handler(3M) man page).
If vop is built under Solaris 2.x using a compiler other than the unbundled Sun C compiler, there is no reporting of arithmetic exceptions.