F_VN_DrawContoursExp
Draws a single point set or multiple point sets that are interpreted as contours. (expert function)
Syntax
Definition:
FUNCTION F_VN_DrawContoursExp : HRESULT
VAR_INPUT
ipContours : ITcVnContainer;
nContourIndex : DINT;
ipDestImage : ITcVnImage;
END_VAR
VAR_IN_OUT
aColor : TcVnVector4_LREAL;
END_VAR
VAR_INPUT
nThickness : DINT;
eLineType : ETcVnLineType;
ipHierarchy : ITcVnContainer;
nMaxLevel : DINT;
END_VAR
VAR_IN_OUT
aOffset : TcVnPoint;
END_VAR
VAR_INPUT
hrPrev : HRESULT;
END_VAR
Inputs
Name |
Type |
Description |
---|---|---|
ipContours |
Single contour (ContainerType_Vector_TcVnPoint2_DINT) or multiple contours (ContainerType_Vector_Vector_TcVnPoint2_DINT) | |
nContourIndex |
DINT |
Index of a specific contour to be drawn (if negative, all contours within the container are drawn) |
ipDestImage |
Destination image | |
nThickness |
DINT |
Line thickness (if negative, the contours are filled) |
eLineType |
Line type | |
ipHierarchy |
Contour hierarchy (ContainerType_Vector_TcVnVector4_DINT) | |
nMaxLevel |
DINT |
Maximum level of contours to be drawn |
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) |
In/Outputs
Name |
Type |
Description |
---|---|---|
aColor |
Color | |
aOffset |
Offset by which every contour point is shifted |
Further information
The function F_VN_DrawContoursExp corresponds to the function F_VN_DrawContours, extended by additional input variables.
Thus, the hierarchy description, which is returned by the function F_VN_FindContourHierarchyExp in addition to the found contours, can also be taken into account. The hierarchy level up to which the contours are to be drawn is specified via ipHierarchy
and via the input variable nMaxLevel
. If 0 is transferred for ipHierarchy
, the hierarchy is ignored.
aOffset
can be used to draw all contour points with a uniform offset in x and y direction. This is of interest, for example, if the contours were searched in a ROI but are to be drawn into the original image.
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 |