imaqMask

NI Vision for LabWindows/CVI Function

imaqMask

Usage

int imaqMask(Image* dest, const Image* source, const Image* mask);

Purpose

Copies the source image to the destination image in the following manner: If a pixel in the mask has a value of 0, the function sets the corresponding source pixel to 0. Otherwise, the function copies the corresponding source pixel to the destination image.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL, IMAQ_IMAGE_COMPLEX, IMAQ_IMAGE_RGB, IMAQ_IMAGE_HSL

Parameters

Name

Type

Description

dest Image* The destination image.
source const Image* The source image.
mask const Image* The mask image. This image must be an IMAQ_IMAGE_U8 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().