Image: Adjustments: Invert
Invert image color
1. imgInvert oimg:=<new>;
2. imgInvert img:=mat(1) oimg:=mat(2);
Please refer to the page for additional option switches when accessing the x-function from script
Input
Image
Specifies the source image to be manipulated. The default input is the active image.
Output
Specifies the output image. By default, the output image is the same as the input image.
See the syntax here.
The imgInvert function inverts the colors in the specified bitmap, making it like a photographic negative. This function can also be used to invert the color of a 1-bit image, making the black white and the white black.
In this example, we use the imgInvert function to invert the color of the input image:
For gray scale image,
O(x, y) = - I (x, y);
For color Image,
where O(x, y) is the output pixel value, I(x, y) is the input pixel value, and Bits is Bits Per Pixel.
The computation uses L_InvertBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_InvertBitmap topic.
LEADTOOLS Main API Help file, Version 14
imgHue