F_VN_DetectPatternPoints2

F_VN_DetectPatternPoints2 1:

Detects calibration pattern points (circles) within the provided image and sorts them.
Can use available TwinCAT Job Tasks for executing parallel code regions.

Syntax

Definition:

FUNCTION F_VN_DetectPatternPoints2 : HRESULT
VAR_INPUT
    ipSrcImage            : ITcVnImage;
    ipPatternPoints       : Reference To ITcVnContainer;
END_VAR
VAR_IN_OUT
    stBlobDetectionParams : TcVnParamsSB;
END_VAR
VAR_INPUT
    nPatternRows          : UDINT;
    nPatternCols          : UDINT;
    nOptions              : UDINT;
    hrPrev                : HRESULT;
END_VAR

 Inputs

Name

Type

Description

ipSrcImage

ITcVnImage

Source image (USINT, 1 or 3 channels)

ipPatternPoints

Reference To ITcVnContainer

Returns the pattern point positions, sorted row by row from left to right (ContainerType_Vector_TcVnPoint2_REAL; Non-zero interface pointers are reused.)

nPatternRows

UDINT

Expected number of pattern rows

nPatternCols

UDINT

Expected number of pattern columns

nOptions

UDINT

Provide options from ETcVnDetectPatternPointsOptions. Always requires selection of either DPPO_SYMMETRIC or DPPO_ASYMMETRIC. Can optionally be combined with DPPO_CLUSTERING via bitwise OR.

hrPrev

HRESULT

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

 In/Outputs

Name

Type

Description

stBlobDetectionParams

TcVnParamsSB

Parameters to detect and filter contours. At least, suitable values for fMinArea and fMaxArea should be specified.

 Return value

HRESULT

Required License

TC3 Vision Metrology 2D

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4026 or later

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

Tc3_Vision