Skip to content

set_shape_model_paramSetShapeModelParamSetShapeModelParamset_shape_model_paramT_set_shape_model_paramπŸ”—

Short descriptionπŸ”—

set_shape_model_paramSetShapeModelParamSetShapeModelParamset_shape_model_paramT_set_shape_model_param β€” Set selected parameters of the shape model.

SignatureπŸ”—

set_shape_model_param( shape_model ModelID, attribute.name GenParamName, attribute.value GenParamValue )void SetShapeModelParam( const HTuple& ModelID, const HTuple& GenParamName, const HTuple& GenParamValue )static void HOperatorSet.SetShapeModelParam( HTuple modelID, HTuple genParamName, HTuple genParamValue )def set_shape_model_param( model_id: HHandle, gen_param_name: Sequence[str], gen_param_value: Sequence[Union[float, int, str]] ) -> None

Herror T_set_shape_model_param( const Htuple ModelID, const Htuple GenParamName, const Htuple GenParamValue )

void HShapeModel::SetShapeModelParam( const HTuple& GenParamName, const HTuple& GenParamValue ) const

static void HImage::SetShapeModelParam( const HShapeModel& ModelID, const HTuple& GenParamName, const HTuple& GenParamValue )

void HShapeModel.SetShapeModelParam( HTuple genParamName, HTuple genParamValue )

static void HImage.SetShapeModelParam( HShapeModel modelID, HTuple genParamName, HTuple genParamValue )

DescriptionπŸ”—

The operator set_shape_model_paramSetShapeModelParam sets the selected parameters GenParamNamegenParamNamegen_param_name in the shape model ModelIDmodelIDmodel_id. The following parameters can be modified:

'min_contrast'"min_contrast"

Sets the minimum contrast of the object in the search images for the shape model ModelIDmodelIDmodel_id. Thereby, the value of 'min_contrast'"min_contrast" that was originally set, e.g., with create_shape_modelCreateShapeModel, is overwritten for the shape model ModelIDmodelIDmodel_id. Note that if the shape model ModelIDmodelIDmodel_id was read from file and if this file should be changed as well, the shape model ModelIDmodelIDmodel_id must again be written to file after the execution of the operator set_shape_model_paramSetShapeModelParam.

'timeout'"timeout"

Sets the maximum runtime of the operators used to find the shape model ModelIDmodelIDmodel_id (e.g., find_shape_modelFindShapeModel). This is especially useful in cases where a maximum cycle time has to be ensured. The '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" set via set_systemSetSystem. 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".

'border_shape_models'"border_shape_models"

This parameter determines whether the shape model ModelIDmodelIDmodel_id to be found with, e.g., find_shape_modelFindShapeModel, may lie partially outside the image (i.e., whether they may cross the image border). Partially means that the model’s origin still must be located within the image. A different origin set with set_shape_model_originSetShapeModelOrigin is not taken into account.

The value of 'border_shape_models'"border_shape_models" can be 'true'"true", 'false'"false", or 'system'"system". The value 'system'"system" is the default behavior and uses the system-wide used value that was set by set_systemSetSystem for the parameter 'border_shape_models'"border_shape_models".

'use_clutter'"use_clutter"

Disables or enables the use of clutter parameters for the shape model ModelIDmodelIDmodel_id, which have been set previously using set_shape_model_clutterSetShapeModelClutter. The value of 'use_clutter'"use_clutter" can be 'true'"true" or 'false'"false". Note that the value of 'use_clutter'"use_clutter" affects the expected number of entries in the input parameter MinScoreminScoremin_score of the find operators. Please refer to the documentation of the different find operators, e.g., find_shape_modelFindShapeModel.

For newly created shape models, the use of clutter parameters is disabled. After calling set_shape_model_clutterSetShapeModelClutter, the use of clutter parameters is enabled. Clutter parameters and the value of 'use_clutter'"use_clutter" can be queried using get_shape_model_clutterGetShapeModelClutter.

'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_modelFindShapeModel. The size of the cache depends on whether the find operation needs a big parameter space with many discretization steps. This means that a small AngleStepangleStepangle_step and ScaleStepscaleStepscale_step and a big AngleExtentangleExtentangle_extent and a big range given by ScaleMinscaleMinscale_min and ScaleMaxscaleMaxscale_max result in a big memory consumption. Switching the 'model_cache'"model_cache" off (by setting '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").

Execution informationπŸ”—

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

ParametersπŸ”—

ModelIDmodelIDmodel_id (input_control, state is modified) shape_model β†’ (handle)HTuple (HHandle)HShapeModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the model.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array β†’ (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Parameter names.

List of values: 'border_shape_models', 'min_contrast', 'model_cache', 'timeout', 'use_clutter'"border_shape_models", "min_contrast", "model_cache", "timeout", "use_clutter"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array β†’ (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Parameter values.

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

ResultπŸ”—

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

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

create_shape_model_xldCreateShapeModelXld, create_scaled_shape_model_xldCreateScaledShapeModelXld, create_aniso_shape_model_xldCreateAnisoShapeModelXld

Possible successors

find_shape_modelFindShapeModel, find_scaled_shape_modelFindScaledShapeModel, find_aniso_shape_modelFindAnisoShapeModel

Alternatives

set_generic_shape_model_paramSetGenericShapeModelParam

See also

create_shape_model_xldCreateShapeModelXld, create_scaled_shape_model_xldCreateScaledShapeModelXld, create_aniso_shape_model_xldCreateAnisoShapeModelXld, set_shape_model_clutterSetShapeModelClutter, get_shape_model_clutterGetShapeModelClutter

ModuleπŸ”—

Matching