F_VN_FeatureTransform

F_VN_FeatureTransform 1:

Apply a feature transform to one or more sample(s).

Syntax

Definition:

FUNCTION F_VN_FeatureTransform : HRESULT
VAR_INPUT
    ipFeatureTransform : ITcVnMlModel;
    ipSamples          : ITcUnknown;
    pipTransformed     : Pointer To ITcUnknown;
    hrPrev             : HRESULT;
END_VAR

F_VN_FeatureTransform 2: Inputs

Name

Type

Description

ipFeatureTransform

ITcVnMlModel

Feature transform instance to be used

ipSamples

ITcUnknown

Container holding one or more of input sample(s) (ContainerType_Vector_REAL, ContainerType_Vector_LREAL, ContainerType_Vector_Vector_REAL, or ContainerType_Vector_Vector_LREAL)

pipTransformed

Pointer To ITcUnknown

Returns the transformed sample(s) using the same type like ipSamples

hrPrev

HRESULT

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

F_VN_FeatureTransform 3: Return value

HRESULT

Further information

The function F_VN_FeatureTransform transforms the features of one or more samples using a transformation model. An inverse transform can be carried out with the F_VN_InverseFeatureTransform function.

Parameter

Transformation model

A previously created model must be transferred to ipFeatureTransform for feature transformation.

Samples

A container with the samples to be transformed is transferred to ipSamples. The following container types are permitted:

Transformed samples

A container with the transformed samples is returned via the pointer pipTransformed. The container type is taken from ipSamples.

Application

For example, a feature transformation is carried out as follows:

hr := F_VN_FeatureTransform(
    ipFeatureTransform  := ipMlModel,
    ipSamples           := ipSamples,
    pipTransformed      := ADR(ipTransformed),
    hrPrev              := hr);

Related functions

Required License

TC3 Vision Machine Learning

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