imaqCompareConstant

NI Vision for LabWindows/CVI Function

imaqCompareConstant

Usage

int imaqCompareConstant(Image* dest, const Image* source, PixelValue value, ComparisonFunction compare);

Purpose

Copies the source image to the destination image in the following manner: If the given comparison between the source pixel value and the given constant is true, the function sets the destination pixel value to 0. If the comparison is false, the function copies the source pixel value to the destination.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name

Type

Description

dest Image* The destination image.
source const Image* The source image.
value PixelValue The value to compare to the source image. Use the grayscale member of the PixelValue union.
compare ComparisonFunction The method in which the function compares images.

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().