F_VN_GetConnectedComponentExp
Get the mask image (and optionally the outer contour) of a connected component from a label image based on the label ID. (expert function)
Can use available TwinCAT Job Tasks for executing parallel code regions.
Syntax
Definition:
FUNCTION F_VN_GetConnectedComponentExp : HRESULT
VAR_INPUT
ipLabelImage : ITcVnImage;
nLabelID : DINT;
ipMaskImage : Reference To ITcVnImage;
ipContourPoints : Reference To ITcVnContainer;
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipLabelImage |
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. Mask is optional, set to 0 if not required.) |
ipContourPoints |
Reference To ITcVnContainer |
Returns the outer contour of the component(ContainerType_Vector_TcVnPoint2_DINT. Contour is optional, set to 0 if not required.) |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
Required License
TC3 Vision Base
System Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT V3.1.4024.54 or later | PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU | Tc3_Vision |