imaqSegmentation

NI Vision for LabWindows/CVI Function

imaqSegmentation

Usage

int imaqSegmentation(Image* dest, Image* source);

Purpose

Calculates zones of influence around particles in a labeled image. The function finds the nearest particle of each pixel in the source image and sets the pixel value to the labeled value of that particle. Before calling imaqSegmentation(), you must label the particles with imaqLabel().

Image Types Supported

IMAQ_IMAGE_U8, IMAQ_IMAGE_I16

Parameters

Name

Type

Description

dest Image* The destination image.
source Image* The image to segment. The segmentation modifies the border of the source image. The border must be at least one pixel wide.

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.