F_VN_ExecuteNeuralNetwork_SingleLayerOutput

F_VN_ExecuteNeuralNetwork_SingleLayerOutput 1:

Execute a neural network using the provided image as input and provide the output from a specified output layer. The function doesn't perform any pre-processing or transformation.

Syntax

Definition:

FUNCTION F_VN_ExecuteNeuralNetwork_SingleLayerOutput : HRESULT
VAR_INPUT
    ipNeuralNetwork : ITcVnNeuralNetwork;
    ipSrcImage      : ITcVnImage;
    ipDestImage     : Reference To ITcVnImage;
    sLayerName      : STRING;
    hrPrev          : HRESULT;
END_VAR

 Inputs

Name

Type

Description

ipNeuralNetwork

ITcVnNeuralNetwork

Neural network model

ipSrcImage

ITcVnImage

Source image (The image layout must be adapted to match the model's expected input format using e.g. F_VN_ConvertDataLayout or F_VN_ReshapeImage functions if necessary.)

ipDestImage

Reference To ITcVnImage

Destination image (An appropriate destination image based on the output layer is created. To process the destination image, use e.g. F_VN_ConvertDataLayout or F_VN_ReshapeImage if necessary.

sLayerName

STRING

Specify the name of the layer for which the output is required. If empty, the output of the last output layer is provided.

hrPrev

HRESULT

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

 Return value

HRESULT

Required License

TC3 Vision Neural Network

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.59 or later

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

Tc3_Vision