set_sample_identifier_paramT_set_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamset_sample_identifier_param (Operator)

Name

set_sample_identifier_paramT_set_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamset_sample_identifier_param — Set selected parameters of a sample identifier.

Warning

set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamSetSampleIdentifierParamset_sample_identifier_param is obsolete and is only provided for reasons of backward compatibility. New applications should use the operators for Deep-Learning-based classification instead, for details see Deep Learning / Classification.

Signature

set_sample_identifier_param( : : SampleIdentifier, GenParamName, GenParamValue : )

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

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

void HSampleIdentifier::SetSampleIdentifierParam(const HString& GenParamName, const HTuple& GenParamValue) const

void HSampleIdentifier::SetSampleIdentifierParam(const HString& GenParamName, double GenParamValue) const

void HSampleIdentifier::SetSampleIdentifierParam(const char* GenParamName, double GenParamValue) const

void HSampleIdentifier::SetSampleIdentifierParam(const wchar_t* GenParamName, double GenParamValue) const   ( Windows only)

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

void HSampleIdentifier.SetSampleIdentifierParam(string genParamName, HTuple genParamValue)

void HSampleIdentifier.SetSampleIdentifierParam(string genParamName, double genParamValue)

def set_sample_identifier_param(sample_identifier: HHandle, gen_param_name: str, gen_param_value: Union[float, int, str]) -> None

Description

The operator set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamSetSampleIdentifierParamset_sample_identifier_param is used to set or change the different parameters of the given SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifiersample_identifier.

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

The following parameters can be used to influence the behavior of the SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifiersample_identifier. These parameters and their corresponding values can be specified by using GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value, respectively. The following values for GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name are possible:

'use_color_info'"use_color_info""use_color_info""use_color_info""use_color_info""use_color_info":

This parameter determines if color information is used for the identification. If 'use_color_info'"use_color_info""use_color_info""use_color_info""use_color_info""use_color_info" is set to 'true'"true""true""true""true""true", color information is used. Note that in this case, the images used for apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifierapply_sample_identifier must be RGB color images. If 'use_color_info'"use_color_info""use_color_info""use_color_info""use_color_info""use_color_info" is set to 'false'"false""false""false""false""false", no color information is used. Use color information if the objects to be identified have different colors and the illumination can be controlled to some degree. In this case, the use of color information makes the identification more robust.

Note that in contrast to the generic parameter 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info", which can only be set in create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier, this parameter affects only the operator apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifierapply_sample_identifier. With this, it is, e.g., possible to train the sample identifier using texture and color and to identify selected objects only based on the texture information.

List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

Default value: As long as 'use_color_info'"use_color_info""use_color_info""use_color_info""use_color_info""use_color_info" has not been set, the value set with 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info" in create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier is used.

'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info":

This parameter determines if texture information is used for the identification. If 'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info" is set to 'true'"true""true""true""true""true", texture information is used. If 'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info" is set to 'false'"false""false""false""false""false", no texture information is used. Typically, 'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info" should be set to 'true'"true""true""true""true""true", because sample-based identification requires textured objects. Note that at least one of the two generic parameters 'use_color_info'"use_color_info""use_color_info""use_color_info""use_color_info""use_color_info" and 'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info" must be set to 'true'"true""true""true""true""true".

Note that in contrast to the generic parameter 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info", which can only be set in create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier, this parameter affects only the operator apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifierapply_sample_identifier.

List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

Default value: As long as 'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info" has not been set, the value set with 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info" in create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier is used.

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

See create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier 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_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier 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_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier 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_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier will be used.

'rating_method'"rating_method""rating_method""rating_method""rating_method""rating_method":

See apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifierapply_sample_identifier for a description of this parameter that is used only by apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifierapply_sample_identifier.

List of values: 'distance'"distance""distance""distance""distance""distance", 'score'"score""score""score""score""score", 'score_single'"score_single""score_single""score_single""score_single""score_single"

Default value: 'score'"score""score""score""score""score"

Execution Information

Parameters

SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifiersample_identifier (input_control)  sample_identifier HSampleIdentifier, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

Handle of the sample identifier.

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control)  attribute.name HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Parameter name.

Default: 'rating_method' "rating_method" "rating_method" "rating_method" "rating_method" "rating_method"

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", 'rating_method'"rating_method""rating_method""rating_method""rating_method""rating_method", 'use_color_info'"use_color_info""use_color_info""use_color_info""use_color_info""use_color_info", 'use_texture_info'"use_texture_info""use_texture_info""use_texture_info""use_texture_info""use_texture_info"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (input_control)  attribute.value HTupleUnion[float, int, str]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)

Parameter value.

Default: 'score_single' "score_single" "score_single" "score_single" "score_single" "score_single"

List of values: 0.25, 0.5, 0.75, 1.0, 2, 3, 4, 'distance'"distance""distance""distance""distance""distance", 'false'"false""false""false""false""false", '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", 'score'"score""score""score""score""score", 'score_single'"score_single""score_single""score_single""score_single""score_single", 'subsampling_step'"subsampling_step""subsampling_step""subsampling_step""subsampling_step""subsampling_step", 'true'"true""true""true""true""true"

Result

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

Possible Predecessors

create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier, read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifierread_sample_identifier

Alternatives

create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier

See also

add_sample_identifier_preparation_dataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationDataadd_sample_identifier_preparation_data, prepare_sample_identifierprepare_sample_identifierPrepareSampleIdentifierPrepareSampleIdentifierPrepareSampleIdentifierprepare_sample_identifier, add_sample_identifier_training_dataadd_sample_identifier_training_dataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataAddSampleIdentifierTrainingDataadd_sample_identifier_training_data, train_sample_identifiertrain_sample_identifierTrainSampleIdentifierTrainSampleIdentifierTrainSampleIdentifiertrain_sample_identifier, apply_sample_identifierapply_sample_identifierApplySampleIdentifierApplySampleIdentifierApplySampleIdentifierapply_sample_identifier, get_sample_identifier_paramget_sample_identifier_paramGetSampleIdentifierParamGetSampleIdentifierParamGetSampleIdentifierParamget_sample_identifier_param, get_sample_identifier_object_infoget_sample_identifier_object_infoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfoGetSampleIdentifierObjectInfoget_sample_identifier_object_info, remove_sample_identifier_preparation_dataremove_sample_identifier_preparation_dataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationDataRemoveSampleIdentifierPreparationDataremove_sample_identifier_preparation_data, remove_sample_identifier_training_dataremove_sample_identifier_training_dataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingDataRemoveSampleIdentifierTrainingDataremove_sample_identifier_training_data, write_sample_identifierwrite_sample_identifierWriteSampleIdentifierWriteSampleIdentifierWriteSampleIdentifierwrite_sample_identifier, serialize_sample_identifierserialize_sample_identifierSerializeSampleIdentifierSerializeSampleIdentifierSerializeSampleIdentifierserialize_sample_identifier, deserialize_sample_identifierdeserialize_sample_identifierDeserializeSampleIdentifierDeserializeSampleIdentifierDeserializeSampleIdentifierdeserialize_sample_identifier, set_sample_identifier_object_infoset_sample_identifier_object_infoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfoset_sample_identifier_object_info

Module

Matching