Skip to content

set_generic_shape_model_objectSetGenericShapeModelObjectSetGenericShapeModelObjectset_generic_shape_model_objectT_set_generic_shape_model_object🔗

Short description🔗

set_generic_shape_model_objectSetGenericShapeModelObjectSetGenericShapeModelObjectset_generic_shape_model_objectT_set_generic_shape_model_object — Set iconic objects to the shape model.

Signature🔗

set_generic_shape_model_object( object Object, shape_model ModelID, string GenParamName )void SetGenericShapeModelObject( const HObject& Object, const HTuple& ModelID, const HTuple& GenParamName )static void HOperatorSet.SetGenericShapeModelObject( HObject objectVal, HTuple modelID, HTuple genParamName )def set_generic_shape_model_object( object: HObject, model_id: HHandle, gen_param_name: Sequence[str] ) -> None

Herror T_set_generic_shape_model_object( const Hobject Object, const Htuple ModelID, const Htuple GenParamName )

void HShapeModel::SetGenericShapeModelObject( const HObject& Object, const HTuple& GenParamName ) const

void HShapeModel.SetGenericShapeModelObject( HObject objectVal, HTuple genParamName )

Description🔗

The operator set_generic_shape_model_objectSetGenericShapeModelObject sets parameters of the shape model ModelIDmodelIDmodel_id based on the given ObjectobjectValobject.

The parameter GenParamNamegenParamNamegen_param_name determines for which type of setting the object is used. The following values are supported:

  • 'high_noise_sample'"high_noise_sample":

    Estimate and adapt the shape model parameters to cope better with high noise images. The parameter estimation is done based on the sample search image ObjectobjectValobject. As a consequence the domain of ObjectobjectValobject should contain the model and surrounding background showing noise that is typical for search images.

    The operator modifies the following parameters:

    • 'pyramid_level_lowest'"pyramid_level_lowest"
  • 'clutter_region'"clutter_region":

    Set the clutter region for the shape model. If 'clutter_region'"clutter_region" is set, the value of 'use_clutter'"use_clutter" is automatically set to 'true'"true".

    In case the clutter region is set before the training, it can be specified with regard to the template, and the transformation is estimated automatically. In case the clutter region is set after the training, it can be specified using a model instance found on a search image. This also requires setting its transformation using set_generic_shape_model_paramSetGenericShapeModelParam with 'clutter_hom_mat_2d'"clutter_hom_mat_2d".

    Note that the 'clutter_region'"clutter_region" must not intersect with the final model contours that are generated by train_generic_shape_modelTrainGenericShapeModel.

    The clutter region may not contain negative coordinates. I.e., when defining clutter regions for shape models created from XLD contours, move the XLD template contour (and wanted clutter region) into the positive image area, e.g., using affine_trans_contour_xldAffineTransContourXld. Alternatively use set_generic_shape_model_paramSetGenericShapeModelParam with 'clutter_hom_mat_2d'"clutter_hom_mat_2d" after training.

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🔗

ObjectobjectValobject (input_object) (multichannel-)object(-array) → objectHObjectHObjectHObjectHobject

Iconic object to be set.

ModelIDmodelIDmodel_id (input_control, state is modified) shape_model → (handle)HTuple (HHandle)HShapeModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the shape model.

GenParamNamegenParamNamegen_param_name (input_control) string-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Parameter name.

Default: 'high_noise_sample'"high_noise_sample"
List of values: 'clutter_region', 'high_noise_sample'"clutter_region", "high_noise_sample"

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

create_generic_shape_modelCreateGenericShapeModel

Possible successors

train_generic_shape_modelTrainGenericShapeModel, find_generic_shape_modelFindGenericShapeModel

Module🔗

Matching