set_shape_model_paramT_set_shape_model_paramSetShapeModelParamSetShapeModelParamset_shape_model_param (算子)
名称
set_shape_model_paramT_set_shape_model_paramSetShapeModelParamSetShapeModelParamset_shape_model_param — 设置形状模型的选定参数。
签名
描述
算子 set_shape_model_paramset_shape_model_paramSetShapeModelParamSetShapeModelParamSetShapeModelParamset_shape_model_param sets the selected parameters
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name in the shape model ModelIDModelIDModelIDModelIDmodelIDmodel_id. The following
parameters can be modified:
'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast""min_contrast"
Sets the minimum contrast of the object in the search images for the shape
model ModelIDModelIDModelIDModelIDmodelIDmodel_id.
Thereby, the value of 'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast""min_contrast" that was originally set,
e.g., with create_shape_modelcreate_shape_modelCreateShapeModelCreateShapeModelCreateShapeModelcreate_shape_model, is overwritten for the shape model
ModelIDModelIDModelIDModelIDmodelIDmodel_id. Note that if the shape model ModelIDModelIDModelIDModelIDmodelIDmodel_id was read from
file and if this file should be changed as well, the shape model
ModelIDModelIDModelIDModelIDmodelIDmodel_id must again be written to file after the execution of the
operator set_shape_model_paramset_shape_model_paramSetShapeModelParamSetShapeModelParamSetShapeModelParamset_shape_model_param.
'timeout'"timeout""timeout""timeout""timeout""timeout"
Sets the maximum runtime of the operators used to find the shape model
ModelIDModelIDModelIDModelIDmodelIDmodel_id (e.g., find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModelfind_shape_model). This is especially useful
in cases where a maximum cycle time has to be ensured. The 'timeout'"timeout""timeout""timeout""timeout""timeout"
must be given in milliseconds. The temporal accuracy depends on several
factors including the size of the model, the speed of your computer, and
the 'timer_mode'"timer_mode""timer_mode""timer_mode""timer_mode""timer_mode" set via set_systemset_systemSetSystemSetSystemSetSystemset_system。Be aware that the
runtime of the search increases by up to 10 percent with activated timeout.
To disable the timeout you can either use a negative value or
'false'"false""false""false""false""false".
'border_shape_models'"border_shape_models""border_shape_models""border_shape_models""border_shape_models""border_shape_models"
This parameter determines whether the shape model ModelIDModelIDModelIDModelIDmodelIDmodel_id to be
found with, e.g., find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModelfind_shape_model, may lie partially outside the
image (i.e., whether they may cross the image border).
The value of 'border_shape_models'"border_shape_models""border_shape_models""border_shape_models""border_shape_models""border_shape_models" can be 'true'"true""true""true""true""true",
'false'"false""false""false""false""false", or 'system'"system""system""system""system""system". The value 'system'"system""system""system""system""system"
is the default behavior and uses the system-wide used value that was set by
set_systemset_systemSetSystemSetSystemSetSystemset_system for the parameter 'border_shape_models'"border_shape_models""border_shape_models""border_shape_models""border_shape_models""border_shape_models".
'use_clutter'"use_clutter""use_clutter""use_clutter""use_clutter""use_clutter"
Disables or enables the use of clutter parameters for the shape model
ModelIDModelIDModelIDModelIDmodelIDmodel_id, which have been set previously using
set_shape_model_clutterset_shape_model_clutterSetShapeModelClutterSetShapeModelClutterSetShapeModelClutterset_shape_model_clutter。The value of 'use_clutter'"use_clutter""use_clutter""use_clutter""use_clutter""use_clutter" can be
'true'"true""true""true""true""true" or 'false'"false""false""false""false""false". Note that the value of
'use_clutter'"use_clutter""use_clutter""use_clutter""use_clutter""use_clutter" affects the expected number of entries in the input
parameter MinScoreMinScoreMinScoreMinScoreminScoremin_score of the find operators. Please refer to the
documentation of the different find operators, e.g., find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModelfind_shape_model。
For newly created shape models, the use of clutter parameters is disabled.
After calling set_shape_model_clutterset_shape_model_clutterSetShapeModelClutterSetShapeModelClutterSetShapeModelClutterset_shape_model_clutter, the use of clutter parameters is
enabled. Clutter parameters and the value of 'use_clutter'"use_clutter""use_clutter""use_clutter""use_clutter""use_clutter" can be
queried using get_shape_model_clutterget_shape_model_clutterGetShapeModelClutterGetShapeModelClutterGetShapeModelClutterget_shape_model_clutter。
'model_cache'"model_cache""model_cache""model_cache""model_cache""model_cache"
Disables or enables the use of an internal cache based on temporary memory
that is used by a shape model when it executes, e.g., find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModelfind_shape_model。The size of the cache depends on whether the find operation needs a big search space
with many discretization steps. This means that a small AngleStepAngleStepAngleStepAngleStepangleStepangle_step and
ScaleStepScaleStepScaleStepScaleStepscaleStepscale_step and a big AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent and a big range given by
ScaleMinScaleMinScaleMinScaleMinscaleMinscale_min and ScaleMaxScaleMaxScaleMaxScaleMaxscaleMaxscale_max result in a
big memory consumption. Switching the 'model_cache' off (by setting 'false'"false""false""false""false""false")
sometimes results in slightly longer execution times but constantly small memory
footprint, particularly important in embedded applications. By default, this cache is
switched on ('true'"true""true""true""true""true").
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子修改后续输入参数的状态:
在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。
参数
ModelIDModelIDModelIDModelIDmodelIDmodel_id (输入控制,状态被修改) shape_model → HShapeModel, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Handle of the model.
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) attribute.name-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Parameter names.
值列表:
'border_shape_models'"border_shape_models""border_shape_models""border_shape_models""border_shape_models""border_shape_models", 'min_contrast'"min_contrast""min_contrast""min_contrast""min_contrast""min_contrast", 'model_cache'"model_cache""model_cache""model_cache""model_cache""model_cache", 'timeout'"timeout""timeout""timeout""timeout""timeout", 'use_clutter'"use_clutter""use_clutter""use_clutter""use_clutter""use_clutter"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输入控制) attribute.value-array → HTupleSequence[Union[float, int, str]]HTupleHtuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Parameter values.
值列表:
'false'"false""false""false""false""false", 'system'"system""system""system""system""system", 'true'"true""true""true""true""true"
结果
如果参数有效,算子 set_shape_model_paramset_shape_model_paramSetShapeModelParamSetShapeModelParamSetShapeModelParamset_shape_model_param 返回值 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
可能的前趋
create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXldCreateShapeModelXldcreate_shape_model_xld,
create_scaled_shape_model_xldcreate_scaled_shape_model_xldCreateScaledShapeModelXldCreateScaledShapeModelXldCreateScaledShapeModelXldcreate_scaled_shape_model_xld,
create_aniso_shape_model_xldcreate_aniso_shape_model_xldCreateAnisoShapeModelXldCreateAnisoShapeModelXldCreateAnisoShapeModelXldcreate_aniso_shape_model_xld
可能的后继
find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModelfind_shape_model,
find_scaled_shape_modelfind_scaled_shape_modelFindScaledShapeModelFindScaledShapeModelFindScaledShapeModelfind_scaled_shape_model,
find_aniso_shape_modelfind_aniso_shape_modelFindAnisoShapeModelFindAnisoShapeModelFindAnisoShapeModelfind_aniso_shape_model
替代
set_generic_shape_model_paramset_generic_shape_model_paramSetGenericShapeModelParamSetGenericShapeModelParamSetGenericShapeModelParamset_generic_shape_model_param
另见
create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXldCreateShapeModelXldcreate_shape_model_xld,
create_scaled_shape_model_xldcreate_scaled_shape_model_xldCreateScaledShapeModelXldCreateScaledShapeModelXldCreateScaledShapeModelXldcreate_scaled_shape_model_xld,
create_aniso_shape_model_xldcreate_aniso_shape_model_xldCreateAnisoShapeModelXldCreateAnisoShapeModelXldCreateAnisoShapeModelXldcreate_aniso_shape_model_xld,
set_shape_model_clutterset_shape_model_clutterSetShapeModelClutterSetShapeModelClutterSetShapeModelClutterset_shape_model_clutter,
get_shape_model_clutterget_shape_model_clutterGetShapeModelClutterGetShapeModelClutterGetShapeModelClutterget_shape_model_clutter
模块
匹配