ReadQRCode

Detect and interpret a QR code within the provided image. Can be canceled by Watchdog.

Syntax

Definition:

HRESULT ReadQRCode(
    HRESULT          hrPrev,
    ITcVnImage*      ipSrcImage,
    ITcVnContainer*& ipDecodedData,
    ITcVnContainer** pipContours = nullptr,
    LONG             nCodeNumber = 1,
    ULONG            eSearchStrategy = CSS_DEFAULT,
    ITcVnContainer** pipAngles = nullptr
)

Parameters

Name

Type

Default

Description

hrPrev

HRESULT

 

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

ipSrcImage

ITcVnImage*

 

Source image (USINT elements, 1 channel or 3 channel (3 channel input is expected to be RGB and internally converted to Gray))

ipDecodedData

ITcVnContainer*&

 

Returns the decoded code (ContainerType_Vector_String_SINT)

pipContours

ITcVnContainer**

nullptr

Returns the code positions as contours (optional, set to 0 if not required; ContainerType_Vector_Vector_TcVnPoint2_DINT)

nCodeNumber

LONG

1

Number of QR codes that should be detected within the provided image (currently only 1 supported).

eSearchStrategy

ULONG

CSS_DEFAULT

Used search strategy (ETcVn2dCodeSearchStrategy)

pipAngles

ITcVnContainer**

nullptr

Returns the clockwise code rotation angles (optional, set to 0 if not required; ContainerType_Vector_REAL)

ReadQRCode 1: Return value

HRESULT

Required License

TC3 Vision Code Reading

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