imaqAbsoluteDifferenceConstant
Usage
int imaqAbsoluteDifferenceConstant(Image* dest, const Image* source, PixelValue value);
Purpose
Subtracts a constant from an image and returns the absolute value of the difference.
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
source | const Image* | The image from which the function subtracts a scalar constant. |
value | PixelValue | The value to subtract from the 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(). |
Parameter Discussion
value must correspond to the image type, as follows:
- If the image is IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, or IMAQ_IMAGE_SGL, use the grayscale value of the PixelValue union.
- If the image is IMAQ_IMAGE_RGB, use the rgb value of the PixelValue union.