F_VN_GetClusterNum

F_VN_GetClusterNum 1:

Get the number of clusters used by this clusterer.

Syntax

Definition:

FUNCTION F_VN_GetClusterNum : HRESULT
VAR_INPUT
    ipClusterer : ITcVnMlModel;
END_VAR
VAR_IN_OUT
    nClusterNum : ULINT;
END_VAR
VAR_INPUT
    hrPrev      : HRESULT;
END_VAR

F_VN_GetClusterNum 2: Inputs

Name

Type

Description

ipClusterer

ITcVnMlModel

Clusterer to be used

hrPrev

HRESULT

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

F_VN_GetClusterNum 3: In/Outputs

Name

Type

Description

nClusterNum

ULINT

Returns the number of clusters

F_VN_GetClusterNum 4: Return value

HRESULT

Further information

The function F_VN_GetClusterNum returns the number of clusters in a Clusterer model.

Parameter

Clusterer model

The previously trained Clusterer model must be transferred to ipClusterer.

Number of clusters

The number of clusters is returned via nClusterNum.

Application

For example, the number of clusters can be determined as follows:

hr := F_VN_GetClusterNum(
    ipClusterer   := ipClusterer,
    nClusterNum   := nClusterNum,
    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