imaqGrayMorphology

NI Vision for LabWindows/CVI Function

imaqGrayMorphology

Usage

int imaqGrayMorphology(Image* dest, Image* source, MorphologyMethod method, const StructuringElement* structuringElement);

Purpose

Applies morphological transformations to gray level images.

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16, IMAQ_IMAGE_SGL

Parameters

Name

Type

Description

dest Image* The destination image.
source Image* The image on which the function performs the morphological operation. The calculation modifies the border of the source image. The border must be at least half as large as the larger of the dimensions of the structuring element.
method MorphologyMethod The morphological transformation to apply.
structuringElement const StructuringElement* The structuring element used in the operation. Set this parameter to NULL if you do not want a custom structuring element.

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

source—This function modifies the source image. If you need the original image, create a copy of the image using imaqDuplicate() before using this function.