invert ( Image : ImageInvert : : )

Invert an image.

The operator invert inverts the gray values of an image. For images of the 'byte' and 'cyclic' type the result is calculated as:

     g' = 255 - g
Images of the 'direction' type are transformed by
     g' = (g + 90) modulo 180
In the case of signed types the values are negated. The resulting image has the same pixel type as the input image.


Parameters

Image (input_object)
image(-array) -> object : byte / int1 / int2 / int4 / real / cyclic / direction
Input image

ImageInvert (output_object)
image(-array) -> object : byte / int1 / int2 / int4 / real / cyclic / direction
Image with inverted gray values.


Example
read_image(Orig::"fabrik":) >
invert(Orig:Invert::) >
disp_image(Invert:::). >

Possible Successors

watersheds


Alternatives

scale__


See also

scale__, add__, sub__



Copyright © 1996-1997 MVTec Software GmbH