imaqMulDiv
Usage
int imaqMulDiv(Image* dest, const Image* sourceA, const Image* sourceB, float value);
Purpose
Computes a ratio between the two source images. You find the ratio by multiplying each pixel value in the first source image by the constant value you supply. This result is divided by the corresponding pixel in the second source, and the final result is stored in the destination image. You can use this function to correct a background if the background is lighter than the image. In a background correction, the first source image is the acquired image and the second source image is the background image.
Image Types Supported
IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_RGB
Parameters
Name
|
Type
|
Description
|
---|---|---|
dest | Image* | The destination image. |
sourceA | const Image* | The first source image. |
sourceB | const Image* | The second source image, which must be the same type of image as sourceA. |
value | float | The value by which the function multiplies the first 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(). |