DetectCodesNeuralNetwork
Detect various code types, such as barcodes, QR codes, Data Matrix codes and DotCodes within the provided image using a trained neural network model based on eModelType. The detected code regions and types (if supported) are sorted by their model confidence, from highest to lowest.
Can use available TwinCAT Job Tasks for executing parallel code regions.
Syntax
Definition:
HRESULT DetectCodesNeuralNetwork(
HRESULT hrPrev,
ITcVnImage* ipSrcImage,
ITcVnContainer*& ipCodeRegions,
ITcVnContainer*& ipCodeTypes,
ETcVnCodeDetectionModel eModelType,
ULONGLONG nCodeType
)Parameters
|
Name |
Type |
Description |
|---|---|---|
|
hrPrev |
HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.) | |
|
ipSrcImage |
Source image (USINT elements, 1 or 3 channels) | |
|
ipCodeRegions |
Returns the code positions as upright rectangles or rotated rectangles based on eModelType (ContainerType_Vector_TcVnRectangle_DINT or ContainerType_Vector_TcVnRotatedRectangle; Non-zero interface pointers are reused.) | |
|
ipCodeTypes |
Returns the code type (ETcVnCodeType) of each detected code (ContainerType_Vector_ULINT; Non-zero interface pointers are reused), set to 0 if not required. | |
|
eModelType |
Type of the neural network model for code detection. Different neural network models are available, including models specialized for 1D codes, 2D codes, or all code types. | |
|
nCodeType |
ULONGLONG |
Specifies the code type(s) to detect. Multiple values from the ETcVnCodeType enumeration can be combined by performing a bitwise OR operation. |
Required License
TC3 Vision Code Reading
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 |