imaqInverse
Usage
int imaqInverse(Image* dest, const Image* source, const Image* mask);
Purpose
Inverts the pixel intensities of an image using the following equation:
f(p) = dynamicMax - p + dynamicMin
where
p represents the value of a pixel.
dynamicMin represents 0 (8-bit images) or the smallest pixel value in the source image (16-bit and floating point images).
dynamicMax represents 255 (8-bit images) or the largest pixel value in the source image (16-bit and floating point images).
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | const Image* | The image to invert. |
mask | const Image* | An optional mask image. This image must be an IMAQ_IMAGE_U8 image. The function inverts only those pixels in the source image whose corresponding pixels in the mask are non-zero. Set this parameter to NULL to invert the pixel intensities of the entire source image. |
Return Value
Type |
Description |
---|---|
int | On success, this function returns a non-zero value. On failure, this function returns 0. To get extended error information, call imaqGetLastError(). |