ClassesClassesClassesClasses | | | | Operators

add_sample_identifier_training_dataT_add_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData (Operator)

Name

add_sample_identifier_training_dataT_add_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData — Add training data to an existing sample identifier.

Signature

add_sample_identifier_training_data(SampleImage : : SampleIdentifier, ObjectIdx, GenParamName, GenParamValue : ObjectSampleIdx)

Herror T_add_sample_identifier_training_data(const Hobject SampleImage, const Htuple SampleIdentifier, const Htuple ObjectIdx, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ObjectSampleIdx)

Herror add_sample_identifier_training_data(Hobject SampleImage, const HTuple& SampleIdentifier, const HTuple& ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue, Hlong* ObjectSampleIdx)

Hlong HImage::AddSampleIdentifierTrainingData(const HSampleIdentifier& SampleIdentifier, const HTuple& ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const

Hlong HSampleIdentifier::AddSampleIdentifierTrainingData(const HImage& SampleImage, const HTuple& ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const

void AddSampleIdentifierTrainingData(const HObject& SampleImage, const HTuple& SampleIdentifier, const HTuple& ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ObjectSampleIdx)

Hlong HImage::AddSampleIdentifierTrainingData(const HSampleIdentifier& SampleIdentifier, const HTuple& ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const

Hlong HImage::AddSampleIdentifierTrainingData(const HSampleIdentifier& SampleIdentifier, Hlong ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const

Hlong HSampleIdentifier::AddSampleIdentifierTrainingData(const HImage& SampleImage, const HTuple& ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const

Hlong HSampleIdentifier::AddSampleIdentifierTrainingData(const HImage& SampleImage, Hlong ObjectIdx, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HOperatorSetX.AddSampleIdentifierTrainingData(
[in] IHUntypedObjectX* SampleImage, [in] VARIANT SampleIdentifier, [in] VARIANT ObjectIdx, [in] VARIANT GenParamName, [in] VARIANT GenParamValue, [out] VARIANT* ObjectSampleIdx)

Hlong HImageX.AddSampleIdentifierTrainingData(
[in] IHSampleIdentifierX* SampleIdentifier, [in] VARIANT ObjectIdx, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

Hlong HSampleIdentifierX.AddSampleIdentifierTrainingData(
[in] IHImageX* SampleImage, [in] VARIANT ObjectIdx, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

static void HOperatorSet.AddSampleIdentifierTrainingData(HObject sampleImage, HTuple sampleIdentifier, HTuple objectIdx, HTuple genParamName, HTuple genParamValue, out HTuple objectSampleIdx)

int HImage.AddSampleIdentifierTrainingData(HSampleIdentifier sampleIdentifier, HTuple objectIdx, HTuple genParamName, HTuple genParamValue)

int HImage.AddSampleIdentifierTrainingData(HSampleIdentifier sampleIdentifier, int objectIdx, HTuple genParamName, HTuple genParamValue)

int HSampleIdentifier.AddSampleIdentifierTrainingData(HImage sampleImage, HTuple objectIdx, HTuple genParamName, HTuple genParamValue)

int HSampleIdentifier.AddSampleIdentifierTrainingData(HImage sampleImage, int objectIdx, HTuple genParamName, HTuple genParamValue)

Description

add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData adds training data to an existing sample identifier. This is a prerequisite for the training of the sample identifier with the operator train_sample_identifiertrain_sample_identifierTrainSampleIdentifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifier.

See create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier for an explanation of the concept of sample-based identification.

In order to be able to identify objects, the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier must be trained with a representative set of sample images of the objects to be identified. These sample images must be added to the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier with add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData.

With each call of add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData, one SampleImageSampleImageSampleImageSampleImageSampleImagesampleImage is added to the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier. The complete training data, which consists of all the sample images that have been added to the sample identifier with multiple calls of add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData, must cover

The domain of the SampleImageSampleImageSampleImageSampleImageSampleImagesampleImage should be reduced to the object, which is visible in the image. This is necessary to avoid that the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier is trained to the background of the sample images.

Note that in contrast to the preparation data, it is essential that the requirements mentioned above are fulfilled. Otherwise, the sample identifier will not be able to identify the objects for which relevant sample images are missing.

Also note that you must provide RGB color images, if the generic parameter 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info" has been set to 'true'"true""true""true""true""true" in create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier.

Ideally, the images used for preparation and training (see add_sample_identifier_preparation_dataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationData and prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifier) are identical. See prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifier for an explanation on how to reuse preparation data for the training of the sample identifier.

The following generic parameters can be used to influence the behavior of the operator add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData. These parameters and their corresponding values can be specified by using GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue, respectively. The following values for GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName are possible:

'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method":

See create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier for a description of this parameter.

List of values: 'none'"none""none""none""none""none", 'scale_factor'"scale_factor""scale_factor""scale_factor""scale_factor""scale_factor", 'subsampling_step'"subsampling_step""subsampling_step""subsampling_step""subsampling_step""subsampling_step", 'image_area'"image_area""image_area""image_area""image_area""image_area"

Default value: If the 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method" is not set explicitly by this operator, the value that has been set with create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier or set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParam will be used.

'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value":

See create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier for a description of this parameter.

Suggested values: 0.25, 0.5, 1.0, 2, 3, 4

Default value: If the 'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value" is not set explicitly by this operator, the value that has been set with create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier or set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParam will be used.

add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingData returns the object sample index of the training sample given in SampleImageSampleImageSampleImageSampleImageSampleImagesampleImage. This index can, e.g., be used to remove this sample from the training data, if the sample identifier should be retrained based on a different set of training data.

Parallelization

Parameters

SampleImageSampleImageSampleImageSampleImageSampleImagesampleImage (input_object)  (multichannel-)image objectHImageHImageHImageHImageXHobject (byte)

Image that shows an object.

SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifier (input_control)  sample_identifier HSampleIdentifier, HTupleHTupleHSampleIdentifier, HTupleHSampleIdentifierX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the sample identifier.

ObjectIdxObjectIdxObjectIdxObjectIdxObjectIdxobjectIdx (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*) (Hlong / BSTR) (Hlong / char*)

Index of the object visible in the SampleImageSampleImageSampleImageSampleImageSampleImagesampleImage.

List of values: 0, 1, 2, 3, 4, 5

GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Generic parameter name.

Default value: []

List of values: 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method", 'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value"

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value-array HTupleHTupleHTupleVARIANTHtuple (real / string / integer) (double / string / int / long) (double / HString / Hlong) (double / char* / Hlong) (double / BSTR / Hlong) (double / char* / Hlong)

Generic parameter value.

Default value: []

List of values: 0.25, 0.5, 0.75, 1.0, 2, 3, 4, 'image_area'"image_area""image_area""image_area""image_area""image_area", 'none'"none""none""none""none""none", 'scale_factor'"scale_factor""scale_factor""scale_factor""scale_factor""scale_factor", 'subsampling_step'"subsampling_step""subsampling_step""subsampling_step""subsampling_step""subsampling_step"

ObjectSampleIdxObjectSampleIdxObjectSampleIdxObjectSampleIdxObjectSampleIdxobjectSampleIdx (output_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Index of the object sample.

Result

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

Possible Predecessors

prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifier, read_sample_identifierread_sample_identifierReadSampleIdentifierread_sample_identifierReadSampleIdentifierReadSampleIdentifier

Possible Successors

train_sample_identifiertrain_sample_identifierTrainSampleIdentifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifier

Alternatives

read_sample_identifierread_sample_identifierReadSampleIdentifierread_sample_identifierReadSampleIdentifierReadSampleIdentifier

See also

create_sample_identifiercreate_sample_identifierCreateSampleIdentifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifier, add_sample_identifier_preparation_dataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationData, apply_sample_identifierapply_sample_identifierApplySampleIdentifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifier, set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParam, get_sample_identifier_paramget_sample_identifier_paramGetSampleIdentifierParamget_sample_identifier_paramGetSampleIdentifierParamGetSampleIdentifierParam, get_sample_identifier_object_infoget_sample_identifier_object_infoGetSampleIdentifierObjectInfoget_sample_identifier_object_infoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfo, remove_sample_identifier_preparation_dataremove_sample_identifier_preparation_dataRemoveSampleIdentifierPreparationDataremove_sample_identifier_preparation_dataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationData, remove_sample_identifier_training_dataremove_sample_identifier_training_dataRemoveSampleIdentifierTrainingDataremove_sample_identifier_training_dataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingData, write_sample_identifierwrite_sample_identifierWriteSampleIdentifierwrite_sample_identifierWriteSampleIdentifierWriteSampleIdentifier, serialize_sample_identifierserialize_sample_identifierSerializeSampleIdentifierserialize_sample_identifierSerializeSampleIdentifierSerializeSampleIdentifier, deserialize_sample_identifierdeserialize_sample_identifierDeserializeSampleIdentifierdeserialize_sample_identifierDeserializeSampleIdentifierDeserializeSampleIdentifier, clear_sample_identifierclear_sample_identifierClearSampleIdentifierclear_sample_identifierClearSampleIdentifierClearSampleIdentifier, set_sample_identifier_object_infoset_sample_identifier_object_infoSetSampleIdentifierObjectInfoset_sample_identifier_object_infoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfo

Module

Matching


ClassesClassesClassesClasses | | | | Operators