F_VN_GetConnectedComponent

F_VN_GetConnectedComponent 1:

Get the mask image of a connected component from a label image based on the label ID.

Syntax

Definition:

FUNCTION F_VN_GetConnectedComponent : HRESULT
VAR_INPUT
    ipLabelImage : ITcVnImage;
    nLabelID     : DINT;
    ipMaskImage  : Reference To ITcVnImage;
    hrPrev       : HRESULT;
END_VAR

F_VN_GetConnectedComponent 2: Inputs

Name

Type

Description

ipLabelImage

ITcVnImage

Image containing labels for each pixel (1 channel DINT or UINT).

nLabelID

DINT

Value of the requested label

ipMaskImage

Reference To ITcVnImage

Returns a mask image marking the pixels that belong to the component (1 channel USINT.)

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

F_VN_GetConnectedComponent 3: Return value

HRESULT

Required License

TC3 Vision Base

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.59 or later

PC or CX (x64) with min. PL50, e.g. Intel 4-core Atom CPU

Tc3_Vision