imaqQuantify

NI Vision for LabWindows/CVI Function

imaqQuantify

Usage

QuantifyReport* imaqQuantify(const Image* image, const Image* mask);

Purpose

Calculates statistical parameters on an image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name

Type

Description

image const Image* The image to quantify.
mask const Image* If provided, a labeled version of the source image specifying the regions to quantify. This image must be an IMAQ_IMAGE_U8 image or IMAQ_IMAGE_I16 image. Only the pixels in the original image that correspond to an equivalent pixel in the mask different from 0 are used for the quantification. Each pixel in this mask indicates, by its value, which region belongs to the corresponding pixel in the image. Up to 255 different regions for an IMAQ_IMAGE_U8 image, or 65,535 regions for an IMAQ_IMAGE_I16 image, can be quantified directly from the image. Set this parameter to NULL if you want the function to quantify the whole image as one region.

Return Value

Type

Description

QuantifyReport* On success, this function returns a pointer to a report describing the statistical parameters of the image. On failure, this function returns NULL. To get extended error information, call imaqGetLastError(). When you are finished with the return value, dispose of the pointer by calling imaqDispose().