imaqDivide2

NI Vision for LabWindows/CVI Function

imaqDivide2

Usage

int imaqDivide2(Image* dest, const Image* sourceA, const Image* sourceB, RoundingMode roundingMode);

Purpose

Divides two images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB

Parameters

Name

Type

Description

dest Image* The destination image.
sourceA const Image* The first image to divide.
sourceB const Image* The second image to divide.
roundingMode RoundingMode Specifies the type of rounding to use when dividing image pixels.

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

The image type of sourceB depends on the image type of sourceA, as follows:

  • If sourceA is IMAQ_IMAGE_I16, sourceB must be IMAQ_IMAGE_I16 or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_SGL, sourceB must be IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_COMPLEX, sourceB must be IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_SGL, IMAQ_IMAGE_I16, or IMAQ_IMAGE_U8.
  • If sourceA is IMAQ_IMAGE_RGB, sourceB must be IMAQ_IMAGE_RGB or IMAQ_IMAGE_U8.

Otherwise, sourceB must be the same type as sourceA.