Skip to content

get_shape_model_contoursGetShapeModelContoursGetShapeModelContoursget_shape_model_contoursT_get_shape_model_contours🔗

Short description🔗

get_shape_model_contoursGetShapeModelContoursGetShapeModelContoursget_shape_model_contoursT_get_shape_model_contours — Return the contour representation of a shape model.

Signature🔗

get_shape_model_contours( out xld_cont ModelContours, shape_model ModelID, integer Level )void GetShapeModelContours( HObject* ModelContours, const HTuple& ModelID, const HTuple& Level )static void HOperatorSet.GetShapeModelContours( out HObject modelContours, HTuple modelID, HTuple level )def get_shape_model_contours( model_id: HHandle, level: int ) -> HObject

Herror T_get_shape_model_contours( Hobject* ModelContours, const Htuple ModelID, const Htuple Level )

HXLDCont HShapeModel::GetShapeModelContours( Hlong Level ) const

HXLDCont HShapeModel.GetShapeModelContours( int level )

Description🔗

The operator get_shape_model_contoursGetShapeModelContours returns a representation of the shape model ModelIDmodelIDmodel_id as XLD contours in ModelContoursmodelContoursmodel_contours. The parameter Levellevellevel determines for which pyramid level of the model the contour representation should be returned. The contours can be used, for example, to visualize the found instances of the model in an image. It should be noted that the position of ModelContoursmodelContoursmodel_contours is normalized such that the reference point of the model (see set_shape_model_originSetShapeModelOrigin) lies at the pixel position \((0,0)\). Hence, the contours simply need to be translated to the found position in the image (and possibly rotated and scaled around this point).

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.

Parameters🔗

ModelContoursmodelContoursmodel_contours (output_object) xld_cont-array → objectHObjectHXLDContHObjectHobject *

Contour representation of the shape model.

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

Handle of the model.

Levellevellevel (input_control) integer → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Pyramid level for which the contour representation should be returned.

Default: 11
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 101, 2, 3, 4, 5, 6, 7, 8, 9, 10
Restriction: Level >= 1

Result🔗

If the handle of the model is valid, the operator get_shape_model_contoursGetShapeModelContours returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_shape_modelCreateShapeModel, create_scaled_shape_modelCreateScaledShapeModel, create_aniso_shape_modelCreateAnisoShapeModel, read_shape_modelReadShapeModel

Alternatives

get_generic_shape_model_objectGetGenericShapeModelObject

See also

find_shape_modelFindShapeModel, find_scaled_shape_modelFindScaledShapeModel, find_aniso_shape_modelFindAnisoShapeModel, find_shape_modelsFindShapeModels, find_scaled_shape_modelsFindScaledShapeModels, find_aniso_shape_modelsFindAnisoShapeModels

Module🔗

Matching