create_sample_identifierT_create_sample_identifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier (算子)

名称

create_sample_identifierT_create_sample_identifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier — 创建新的样本标识符。

警告

create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier 已过时,仅出于向后兼容性考虑而保留。新应用程序应改用基于深度学习的分类算子,详情请参阅 深度学习 / 分类

签名

create_sample_identifier( : : GenParamName, GenParamValue : SampleIdentifier)

Herror T_create_sample_identifier(const Htuple GenParamName, const Htuple GenParamValue, Htuple* SampleIdentifier)

void CreateSampleIdentifier(const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* SampleIdentifier)

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

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

static void HOperatorSet.CreateSampleIdentifier(HTuple genParamName, HTuple genParamValue, out HTuple sampleIdentifier)

public HSampleIdentifier(HTuple genParamName, HTuple genParamValue)

void HSampleIdentifier.CreateSampleIdentifier(HTuple genParamName, HTuple genParamValue)

def create_sample_identifier(gen_param_name: Sequence[str], gen_param_value: Sequence[Union[str, float, int]]) -> HHandle

描述

算子 create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier creates a new sample identifier. Alternatively, an already available sample identifier can be read from file with the operator read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifierread_sample_identifier

有关基于样本的识别概念的说明,请参阅 遗留 / 识别 一章的引言。

Note that if you want to use color information, you must specify this explicitly by setting the generic parameter 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info" to 'true'"true""true""true""true""true".

The generic parameters can be used to influence the behavior of the sample identifier. Typically, only 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info" must be considered.这些参数及其对应值可分别通过 GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_nameGenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value 进行指定。GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name 的可能取值如下:

'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info"

This parameter determines if color information is used for the identification. If 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info" is set to 'true'"true""true""true""true""true", color information is used. Note that in this case, all images used for the preparation and the training of the sample identifier must be RGB color images. If 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_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 if the illumination can be controlled to some degree. In this case, the use of color information makes the identification more robust.

值列表: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

默认值: 'false'"false""false""false""false""false"

'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info"

This parameter determines if texture information is used for the identification. If 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info" is set to 'true'"true""true""true""true""true", texture information is used. If 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info" is set to 'false'"false""false""false""false""false", no texture information is used. Typically, 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_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 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info" and 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info" must be set to 'true'"true""true""true""true""true".

值列表: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

默认值: 'true'"true""true""true""true""true"

'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method"

To speed up the identification process, the images are resized internally to a given size or by a given factor. If 'none'"none""none""none""none""none" is selected, no resizing will be done. For 'scale_factor'"scale_factor""scale_factor""scale_factor""scale_factor""scale_factor", a constant scale factor can be set and for 'subsampling_step'"subsampling_step""subsampling_step""subsampling_step""subsampling_step""subsampling_step", a constant subsampling step, i.e., the inverse of the scale factor can be set. Finally, for 'image_area'"image_area""image_area""image_area""image_area""image_area", a constant size of the resized image can be specified. The corresponding values can be set with the 'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value" (see below).

To make the identification process faster, choose parameters that lead to a smaller internal image, i.e., use smaller scale factors or image sizes or a larger subsampling step. If the objects to be identified show high-frequency texture, the identification result may become better, if a larger internal image size is used, because otherwise the texture may be eliminated in the resized images.

值列表: '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"

默认值: 'image_area'"image_area""image_area""image_area""image_area""image_area"

'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value"

With this parameter, the selected 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method" can be parameterized. If 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method" is set to 'scale_factor'"scale_factor""scale_factor""scale_factor""scale_factor""scale_factor", the value of 'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value" defines the scale factor to be used. If 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method" is set to 'subsampling_step'"subsampling_step""subsampling_step""subsampling_step""subsampling_step""subsampling_step", the value of 'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value" defines the subsampling step, i.e., the inverse of the scale factor. If 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method" is set to 'image_area'"image_area""image_area""image_area""image_area""image_area", the value of 'image_resize_value'"image_resize_value""image_resize_value""image_resize_value""image_resize_value""image_resize_value" defines the area of the resized image given in megapixels, i.e., in million pixels.

建议值: 0.25, 0.5, 1.0, 2, 3, 4

默认值: The default value depends on the selected 'image_resize_method'"image_resize_method""image_resize_method""image_resize_method""image_resize_method""image_resize_method". It is

  • 0.5 for 'scale_factor'"scale_factor""scale_factor""scale_factor""scale_factor""scale_factor",

  • 2.0 for 'subsampling_step'"subsampling_step""subsampling_step""subsampling_step""subsampling_step""subsampling_step", and

  • 0.5 for 'image_area'"image_area""image_area""image_area""image_area""image_area".

执行信息

此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。

参数

GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制)  attribute.name-array HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)

Parameter name.

默认值: []

值列表: 'add_color_info'"add_color_info""add_color_info""add_color_info""add_color_info""add_color_info", 'add_texture_info'"add_texture_info""add_texture_info""add_texture_info""add_texture_info""add_texture_info", '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"

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制)  attribute.value-array HTupleSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)

Parameter value.

默认值: []

建议值: '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", 0.25, 0.5, 0.75, 1.0, 2, 3, 4, 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

SampleIdentifierSampleIdentifierSampleIdentifierSampleIdentifiersampleIdentifiersample_identifier (输出控制)  sample_identifier HSampleIdentifier, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)

样本标识符的句柄。

结果

如果参数有效,算子 create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。

可能的后继

add_sample_identifier_preparation_dataadd_sample_identifier_preparation_dataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationDataAddSampleIdentifierPreparationDataadd_sample_identifier_preparation_data, set_sample_identifier_paramset_sample_identifier_paramSetSampleIdentifierParamSetSampleIdentifierParamSetSampleIdentifierParamset_sample_identifier_param

替代

read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifierread_sample_identifier

另见

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, clear_sample_identifierclear_sample_identifierClearSampleIdentifierClearSampleIdentifierClearSampleIdentifierclear_sample_identifier, set_sample_identifier_object_infoset_sample_identifier_object_infoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfoSetSampleIdentifierObjectInfoset_sample_identifier_object_info

模块

匹配