invert_imageinvert_imageInvertImageInvertImage (Operator)
Name
invert_imageinvert_imageInvertImageInvertImage
— Invert an image.
Signature
Description
The operator invert_imageinvert_imageInvertImageInvertImageInvertImage
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.
Several images can be processed in one call.
An output image is generated for every input image.
invert_imageinvert_imageInvertImageInvertImageInvertImage
can be executed on an OpenCL device for byte, direction,
cyclic, int1, int2, uint2, int4, and real images.
Execution Information
- Supports OpenCL compute devices.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
- Automatically parallelized on channel level.
- Automatically parallelized on domain level.
Parameters
ImageImageImageImageimage
(input_object) (multichannel-)image(-array) →
objectHImageHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / int8 / real*) *allowed for compute devices
Input image(s).
ImageInvertImageInvertImageInvertImageInvertimageInvert
(output_object) (multichannel-)image(-array) →
objectHImageHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
Image(s) with inverted gray values.
Example (HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
Example (C)
read_image(&Orig,"fabrik");
invert_image(Orig,&Invert);
disp_image(Invert,WindowHandle);
Example (HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
Example (HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
Example (HDevelop)
read_image(Orig,'fabrik')
invert_image(Orig,Invert)
dev_display(Invert)
Possible Successors
watershedswatershedsWatershedsWatershedsWatersheds
Alternatives
scale_imagescale_imageScaleImageScaleImageScaleImage
See also
scale_imagescale_imageScaleImageScaleImageScaleImage
,
add_imageadd_imageAddImageAddImageAddImage
,
sub_imagesub_imageSubImageSubImageSubImage
Module
Foundation