create_sample_identifierT_create_sample_identifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier (算子名称)
名称
create_sample_identifierT_create_sample_identifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier — Create a new sample identifier.
警告
create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier is obsolete and is only provided for
reasons of backward compatibility. New applications should use 该算子s
for Deep-Learning-based classification instead, for details see
Deep Learning / Classification.
参数签名
描述
该算子 create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier creates a new sample
identifier. Alternatively, an already available sample identifier can be
read from file with 该算子 read_sample_identifierread_sample_identifierReadSampleIdentifierReadSampleIdentifierReadSampleIdentifierread_sample_identifier.
For an explanation of the concept of sample-based identification
see the introduction of chapter Legacy / Identification.
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.
The 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:
- '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.
List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"
Default value: '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".
List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"
Default value: '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.
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: '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.
Suggested values: 0.25, 0.5, 1.0,
2, 3, 4
Default value: 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".
运行信息
- 多线程类型:可重入(与非独占操作符并行运行)。
- 多线程作用域:全局(可以从任何线程调用)。
- 未经并行化处理。
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
参数表
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Parameter name.
Default:
[]
List of values:
'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 (input_control) attribute.value-array → HTupleSequence[Union[str, float, int]]HTupleHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong)
Parameter value.
Default:
[]
Suggested 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", 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 (output_control) sample_identifier → HSampleIdentifier, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the sample identifier.
结果
如果参数均有效,算子 create_sample_identifiercreate_sample_identifierCreateSampleIdentifierCreateSampleIdentifierCreateSampleIdentifiercreate_sample_identifier
返回值 2 (
H_MSG_TRUE)
. If necessary an exception is raised.
可能的后置算子
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
模块
Matching