imaqFillHoles

NI Vision for LabWindows/CVI Function

imaqFillHoles

Usage

int imaqFillHoles(Image* dest, const Image* source, int connectivity8);

Purpose

Fills holes in particles. The function fills the holes with a pixel value of 1. The function does not fill areas touching the edge of the image that appear to be holes because these areas could be either holes or areas of concavity.

Image Types Supported

IMAQ_IMAGE_U8

Parameters

Name

Type

Description

dest Image* The destination image.
source const Image* The image containing particles with holes.
connectivity8 int Set this parameter to TRUE to use connectivity-8 to determine whether particles are touching. Set this parameter to FALSE to use connectivity-4 to determine whether particles are touching. For more information about connectivity, see Chapter 9, Binary Morphology, in the NI Vision Concepts Manual.

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