ClassesClasses | | Operators

train_sample_identifierT_train_sample_identifierTrainSampleIdentifierTrainSampleIdentifier (Operator)

Name

train_sample_identifierT_train_sample_identifierTrainSampleIdentifierTrainSampleIdentifier — Train a sample identifier.

Signature

train_sample_identifier( : : SampleIdentifier, GenParamName, GenParamValue : )

Herror T_train_sample_identifier(const Htuple SampleIdentifier, const Htuple GenParamName, const Htuple GenParamValue)

void TrainSampleIdentifier(const HTuple& SampleIdentifier, const HTuple& GenParamName, const HTuple& GenParamValue)

void HSampleIdentifier::TrainSampleIdentifier(const HTuple& GenParamName, const HTuple& GenParamValue) const

static void HOperatorSet.TrainSampleIdentifier(HTuple sampleIdentifier, HTuple genParamName, HTuple genParamValue)

void HSampleIdentifier.TrainSampleIdentifier(HTuple genParamName, HTuple genParamValue)

Description

train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier trains the given SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier using the training data, which has been set with add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData.

For an explanation of the concept of sample-based identification see the introduction of chapter Identification / Sample-Based.

In order to be able to identify objects, the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier must be trained with a representative set of sample images of the objects to be identified (see add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData).

To train the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier, first, all the relevant sample images of the objects to be identified must be added with add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData. Alternatively, the preparation data can be reused. See prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifierPrepareSampleIdentifier for an explanation on how to reuse preparation data for the training of the sample identifier. Then, with the call of train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier, the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier is trained.

Note that the training itself is very fast and does not consume a lot of memory. Therefore, it is very easy to retrain the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier, e.g., after new objects were added or already trained objects were removed from the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier.

To retrain an existing sample identifier with new objects, just add the relevant sample images with add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData and call train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier, again. To remove objects, use the operator remove_sample_identifier_training_dataremove_sample_identifier_training_dataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingData and retrain the sample identifier with train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier.

Note that the training of the sample identifier is only possible, if the sample identifier contains training data for at least two different training objects.

The generic parameters GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue are intended for future use, only.

Execution Information

Parameters

SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier (input_control)  sample_identifier HSampleIdentifier, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the sample identifier.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name-array HTupleHTupleHtuple (string) (string) (HString) (char*)

Parameter name.

Default value: []

List of values: []

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value-array HTupleHTupleHtuple (real / string / integer) (double / string / int / long) (double / HString / Hlong) (double / char* / Hlong)

Parameter value.

Default value: []

List of values: []

Result

If the parameters are valid, the operator train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifier returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Possible Predecessors

add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData

Possible Successors

apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifier, write_sample_identifierwrite_sample_identifierWriteSampleIdentifierWriteSampleIdentifierWriteSampleIdentifier

Alternatives

read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifier

See also

create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifier, add_sample_identifier_preparation_dataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationData, prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifierPrepareSampleIdentifier, apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifier, set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamSetSampleIdentifierParam, get_sample_identifier_paramget_sample_identifier_paramGetSampleIdentifierParamGetSampleIdentifierParamGetSampleIdentifierParam, get_sample_identifier_object_infoget_sample_identifier_object_infoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfo, remove_sample_identifier_preparation_dataremove_sample_identifier_preparation_dataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationData, remove_sample_identifier_training_dataremove_sample_identifier_training_dataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingData, serialize_sample_identifierserialize_sample_identifierSerializeSampleIdentifierSerializeSampleIdentifierSerializeSampleIdentifier, deserialize_sample_identifierdeserialize_sample_identifierDeserializeSampleIdentifierDeserializeSampleIdentifierDeserializeSampleIdentifier, clear_sample_identifierclear_sample_identifierClearSampleIdentifierClearSampleIdentifierClearSampleIdentifier, set_sample_identifier_object_infoset_sample_identifier_object_infoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfo

Module

Matching


ClassesClasses | | Operators