home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
swCHIP 1991 January
/
swCHIP_95-1.bin
/
demo
/
wit4711
/
lib
/
help
/
point
/
unaryop.
/
unaryop.bin
Wrap
Text File
|
1995-12-09
|
2KB
|
42 lines
OPERATOR
unaryOp --- perform a unary operation on an image using a value
DESCRIPTION
The unaryOp operator performs unary operations when both an image A and a
constant K are received at the top and bottom input ports respectively.
Supported operations are:
+ - A + K
- - A - K
* - A * K
/ - A / K
| - logical OR
& - logical AND
>> - shift right
<< - shift left
expression - utilize expression to determine result
The indicated operation is performed on each pixel in A . The expression field
allows the user to specify a C style mathematical equation which will
determine the output image. The image can be specified in this equation using
the variable A while the constant is specified using K. The result for each
pixel can be affected by that pixel's particular column and row using the X
and Y variables respectively. For example, the expression (X >= 5) ? (A >>
K) : A will produce an output image where every pixel was right shifted by K
bits, unless the pixel fell within the first five columns of the image. For
more on the expression syntax and use see calc .
The outputType parameter allows the user to specify the type of WIT image
produced by aluOp. The default option causes a default output image type to
be selected according to the following criterion.
Input Image Types Output Image Type
- if input image or constant is float - output is float
- otherwise, if input image is 16 bit - output is 16 bit
- if input image is signed - output is signed
- if constant is negative - output is signed
- if operation is '-' or 'expr' - output is signed