Skip to content

get_deformable_model_contoursGetDeformableModelContoursGetDeformableModelContoursget_deformable_model_contoursT_get_deformable_model_contours🔗

Short description🔗

get_deformable_model_contoursGetDeformableModelContoursGetDeformableModelContoursget_deformable_model_contoursT_get_deformable_model_contours — Return the contour representation of a deformable model.

Signature🔗

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

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

HXLDCont HDeformableModel::GetDeformableModelContours( Hlong Level ) const

HXLDCont HDeformableModel.GetDeformableModelContours( int level )

Description🔗

The operator get_deformable_model_contoursGetDeformableModelContours returns a representation of the deformable 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.

In case that the model was generated by create_planar_calib_deformable_model_xldCreatePlanarCalibDeformableModelXld, the contours by default are returned in the world coordinate system in metric units. Here, the contours must be transformed by the returned pose for visualizing a match.

In all other cases, the contours of the model by default are returned in the image coordinate system in pixel units. In the calibrated case this system corresponds to the rectified image coordinate system. The rectified image coordinate system is the coordinate system of an image one would obtain by change_radial_distortion_imageChangeRadialDistortionImage when using the rectified camera parameters. The rectified camera parameters can be queried by get_deformable_model_paramsGetDeformableModelParams. It should be noted that the position of ModelContoursmodelContoursmodel_contours is normalized such that the reference point of the model (see set_deformable_model_originSetDeformableModelOrigin) lies at the pixel position \((0,0)\). Hence, the contours simply need to be transformed by the found homography in the image.

The default behavior for the calibrated case can be changed with the generic parameter 'get_deformable_model_contours_coord_system'"get_deformable_model_contours_coord_system" of the operator set_deformable_model_paramSetDeformableModelParam.

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 deformable model.

ModelIDmodelIDmodel_id (input_control) deformable_model → (handle)HTuple (HHandle)HDeformableModel, 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_deformable_model_contoursGetDeformableModelContours returns the value 2 (H_MSG_TRUE). If necessary an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModel, create_planar_uncalib_deformable_model_xldCreatePlanarUncalibDeformableModelXld, read_deformable_modelReadDeformableModel, create_planar_calib_deformable_modelCreatePlanarCalibDeformableModel, create_planar_calib_deformable_model_xldCreatePlanarCalibDeformableModelXld, create_local_deformable_modelCreateLocalDeformableModel, create_local_deformable_model_xldCreateLocalDeformableModelXld

See also

set_deformable_model_paramSetDeformableModelParam, find_planar_uncalib_deformable_modelFindPlanarUncalibDeformableModel, find_planar_calib_deformable_modelFindPlanarCalibDeformableModel

Module🔗

Matching