ClassesClassesClassesClasses | | | | Operators

create_local_deformable_model_xldT_create_local_deformable_model_xldCreateLocalDeformableModelXldcreate_local_deformable_model_xldCreateLocalDeformableModelXldCreateLocalDeformableModelXld (Operator)

Name

create_local_deformable_model_xldT_create_local_deformable_model_xldCreateLocalDeformableModelXldcreate_local_deformable_model_xldCreateLocalDeformableModelXldCreateLocalDeformableModelXld — Prepare a deformable model for local deformable matching from XLD contours.

Signature

create_local_deformable_model_xld(Contours : : NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, MinContrast, ParamName, ParamValue : ModelID)

Herror T_create_local_deformable_model_xld(const Hobject Contours, const Htuple NumLevels, const Htuple AngleStart, const Htuple AngleExtent, const Htuple AngleStep, const Htuple ScaleRMin, const Htuple ScaleRMax, const Htuple ScaleRStep, const Htuple ScaleCMin, const Htuple ScaleCMax, const Htuple ScaleCStep, const Htuple Optimization, const Htuple Metric, const Htuple MinContrast, const Htuple ParamName, const Htuple ParamValue, Htuple* ModelID)

Herror create_local_deformable_model_xld(Hobject Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, const HTuple& ParamName, const HTuple& ParamValue, Hlong* ModelID)

HDeformableModel HXLDCont::CreateLocalDeformableModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, const HTuple& ParamName, const HTuple& ParamValue) const

HDeformableModel HXLDContArray::CreateLocalDeformableModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, const HTuple& ParamName, const HTuple& ParamValue) const

void HDeformableModel::CreateLocalDeformableModelXld(const HXLDContArray& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, const HTuple& ParamName, const HTuple& ParamValue)

void CreateLocalDeformableModelXld(const HObject& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, const HTuple& ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, const HTuple& ParamName, const HTuple& ParamValue, HTuple* ModelID)

void HDeformableModel::CreateLocalDeformableModelXld(const HXLDCont& Contours, const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, double ScaleRMin, double ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, double ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& ParamName, const HTuple& ParamValue)

void HDeformableModel::CreateLocalDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleRMin, double ScaleRMax, double ScaleRStep, double ScaleCMin, double ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& ParamName, const HTuple& ParamValue)

void HDeformableModel::CreateLocalDeformableModelXld(const HXLDCont& Contours, Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleRMin, double ScaleRMax, double ScaleRStep, double ScaleCMin, double ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& ParamName, const HTuple& ParamValue)

HDeformableModel HXLDCont::CreateLocalDeformableModelXld(const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, double ScaleRMin, double ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, double ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& ParamName, const HTuple& ParamValue) const

HDeformableModel HXLDCont::CreateLocalDeformableModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleRMin, double ScaleRMax, double ScaleRStep, double ScaleCMin, double ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, Hlong MinContrast, const HTuple& ParamName, const HTuple& ParamValue) const

HDeformableModel HXLDCont::CreateLocalDeformableModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, double ScaleRMin, double ScaleRMax, double ScaleRStep, double ScaleCMin, double ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, Hlong MinContrast, const HTuple& ParamName, const HTuple& ParamValue) const

void HOperatorSetX.CreateLocalDeformableModelXld(
[in] IHUntypedObjectX* Contours, [in] VARIANT NumLevels, [in] VARIANT AngleStart, [in] VARIANT AngleExtent, [in] VARIANT AngleStep, [in] VARIANT ScaleRMin, [in] VARIANT ScaleRMax, [in] VARIANT ScaleRStep, [in] VARIANT ScaleCMin, [in] VARIANT ScaleCMax, [in] VARIANT ScaleCStep, [in] VARIANT Optimization, [in] VARIANT Metric, [in] VARIANT MinContrast, [in] VARIANT ParamName, [in] VARIANT ParamValue, [out] VARIANT* ModelID)

void HDeformableModelX.CreateLocalDeformableModelXld(
[in] IHXLDContX* Contours, [in] VARIANT NumLevels, [in] double AngleStart, [in] double AngleExtent, [in] VARIANT AngleStep, [in] double ScaleRMin, [in] double ScaleRMax, [in] VARIANT ScaleRStep, [in] double ScaleCMin, [in] double ScaleCMax, [in] VARIANT ScaleCStep, [in] VARIANT Optimization, [in] BSTR Metric, [in] Hlong MinContrast, [in] VARIANT ParamName, [in] VARIANT ParamValue)

IHDeformableModelX* HXLDContX.CreateLocalDeformableModelXld(
[in] VARIANT NumLevels, [in] double AngleStart, [in] double AngleExtent, [in] VARIANT AngleStep, [in] double ScaleRMin, [in] double ScaleRMax, [in] VARIANT ScaleRStep, [in] double ScaleCMin, [in] double ScaleCMax, [in] VARIANT ScaleCStep, [in] VARIANT Optimization, [in] BSTR Metric, [in] Hlong MinContrast, [in] VARIANT ParamName, [in] VARIANT ParamValue)

static void HOperatorSet.CreateLocalDeformableModelXld(HObject contours, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, HTuple scaleRMin, HTuple scaleRMax, HTuple scaleRStep, HTuple scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, HTuple metric, HTuple minContrast, HTuple paramName, HTuple paramValue, out HTuple modelID)

void HDeformableModel.CreateLocalDeformableModelXld(HXLDCont contours, HTuple numLevels, double angleStart, double angleExtent, HTuple angleStep, double scaleRMin, double scaleRMax, HTuple scaleRStep, double scaleCMin, double scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, int minContrast, HTuple paramName, HTuple paramValue)

void HDeformableModel.CreateLocalDeformableModelXld(HXLDCont contours, int numLevels, double angleStart, double angleExtent, double angleStep, double scaleRMin, double scaleRMax, double scaleRStep, double scaleCMin, double scaleCMax, double scaleCStep, string optimization, string metric, int minContrast, HTuple paramName, HTuple paramValue)

HDeformableModel HXLDCont.CreateLocalDeformableModelXld(HTuple numLevels, double angleStart, double angleExtent, HTuple angleStep, double scaleRMin, double scaleRMax, HTuple scaleRStep, double scaleCMin, double scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, int minContrast, HTuple paramName, HTuple paramValue)

HDeformableModel HXLDCont.CreateLocalDeformableModelXld(int numLevels, double angleStart, double angleExtent, double angleStep, double scaleRMin, double scaleRMax, double scaleRStep, double scaleCMin, double scaleCMax, double scaleCStep, string optimization, string metric, int minContrast, HTuple paramName, HTuple paramValue)

Description

The operator create_local_deformable_model_xldcreate_local_deformable_model_xldCreateLocalDeformableModelXldcreate_local_deformable_model_xldCreateLocalDeformableModelXldCreateLocalDeformableModelXld creates a deformable model used for local deformable matching from the XLD contours passed in ContoursContoursContoursContoursContourscontours. The XLD contours represent the gray-value edges of the object to be searched for. In contrast to the operator create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModel, which creates a deformable model from a template image, the operator create_local_deformable_model_xldcreate_local_deformable_model_xldCreateLocalDeformableModelXldcreate_local_deformable_model_xldCreateLocalDeformableModelXldCreateLocalDeformableModelXld creates the deformable model from XLD contours.

The center of gravity of the smallest surrounding rectangle of the ContoursContoursContoursContoursContourscontours is used as the origin (reference point) of the model. A different origin can be set with set_deformable_model_originset_deformable_model_originSetDeformableModelOriginset_deformable_model_originSetDeformableModelOriginSetDeformableModelOrigin.

For further explanation on the deformable model and its parameters we refer to the description of create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel and create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModel. Note that set_local_deformable_model_metricset_local_deformable_model_metricSetLocalDeformableModelMetricset_local_deformable_model_metricSetLocalDeformableModelMetricSetLocalDeformableModelMetric can be used to change the metric of the model.

Attention

Note that, in contrast to the operator create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModel, it is not possible to specify a minimum size of the model components. To avoid small model components in the model, short contours can be eliminated with the operator select_contours_xldselect_contours_xldSelectContoursXldselect_contours_xldSelectContoursXldSelectContoursXld before calling create_local_deformable_model_xldcreate_local_deformable_model_xldCreateLocalDeformableModelXldcreate_local_deformable_model_xldCreateLocalDeformableModelXldCreateLocalDeformableModelXld.

Parallelization

This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.

Parameters

ContoursContoursContoursContoursContourscontours (input_object)  xld_cont(-array) objectHXLDContHXLDContHXLDContHXLDContXHobject

Input contours that will be used to create the model.

NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels (input_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*) (Hlong / BSTR) (Hlong / char*)

Maximum number of pyramid levels.

Default value: 'auto' "auto" "auto" "auto" "auto" "auto"

List of values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 'auto'"auto""auto""auto""auto""auto"

AngleStartAngleStartAngleStartAngleStartAngleStartangleStart (input_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Smallest rotation of the pattern.

Default value: -0.39

Suggested values: -3.14, -1.57, -0.79, -0.39, -0.20, 0.0

AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent (input_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Extent of the rotation angles.

Default value: 0.79

Suggested values: 6.29, 3.14, 1.57, 0.79, 0.39

Restriction: AngleExtent >= 0

AngleStepAngleStepAngleStepAngleStepAngleStepangleStep (input_control)  angle.rad HTupleHTupleHTupleVARIANTHtuple (real / string) (double / string) (double / HString) (double / char*) (double / BSTR) (double / char*)

Step length of the angles (resolution).

Default value: 'auto' "auto" "auto" "auto" "auto" "auto"

Suggested values: 'auto'"auto""auto""auto""auto""auto", 0.0175, 0.0349, 0.0524, 0.0698, 0.0873

Restriction: AngleStep > 0 && AngleStep <= pi / 16

ScaleRMinScaleRMinScaleRMinScaleRMinScaleRMinscaleRMin (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Minimum scale of the pattern in row direction.

Default value: 1.0

Suggested values: 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Restriction: ScaleRMin > 0

ScaleRMaxScaleRMaxScaleRMaxScaleRMaxScaleRMaxscaleRMax (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Maximum scale of the pattern in row direction.

Default value: 1.0

Suggested values: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5

Restriction: ScaleRMax >= ScaleRMin

ScaleRStepScaleRStepScaleRStepScaleRStepScaleRStepscaleRStep (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / string) (double / string) (double / HString) (double / char*) (double / BSTR) (double / char*)

Scale step length (resolution) in row direction.

Default value: 'auto' "auto" "auto" "auto" "auto" "auto"

Suggested values: 'auto'"auto""auto""auto""auto""auto", 0.01, 0.02, 0.05, 0.1, 0.15, 0.2

Restriction: ScaleRStep > 0

ScaleCMinScaleCMinScaleCMinScaleCMinScaleCMinscaleCMin (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Minimum scale of the pattern in column direction.

Default value: 1.0

Suggested values: 0.5, 0.6, 0.7, 0.8, 0.9, 1.0

Restriction: ScaleCMin > 0

ScaleCMaxScaleCMaxScaleCMaxScaleCMaxScaleCMaxscaleCMax (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Maximum scale of the pattern in column direction.

Default value: 1.0

Suggested values: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5

Restriction: ScaleCMax >= ScaleCMin

ScaleCStepScaleCStepScaleCStepScaleCStepScaleCStepscaleCStep (input_control)  number HTupleHTupleHTupleVARIANTHtuple (real / string) (double / string) (double / HString) (double / char*) (double / BSTR) (double / char*)

Scale step length (resolution) in column direction.

Default value: 'auto' "auto" "auto" "auto" "auto" "auto"

Suggested values: 'auto'"auto""auto""auto""auto""auto", 0.01, 0.02, 0.05, 0.1, 0.15, 0.2

Restriction: ScaleCStep > 0

OptimizationOptimizationOptimizationOptimizationOptimizationoptimization (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Kind of optimization used for generating the model.

Default value: 'auto' "auto" "auto" "auto" "auto" "auto"

List of values: 'auto'"auto""auto""auto""auto""auto", 'none'"none""none""none""none""none", 'point_reduction_high'"point_reduction_high""point_reduction_high""point_reduction_high""point_reduction_high""point_reduction_high", 'point_reduction_low'"point_reduction_low""point_reduction_low""point_reduction_low""point_reduction_low""point_reduction_low", 'point_reduction_medium'"point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium"

MetricMetricMetricMetricMetricmetric (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Match metric.

Default value: 'ignore_local_polarity' "ignore_local_polarity" "ignore_local_polarity" "ignore_local_polarity" "ignore_local_polarity" "ignore_local_polarity"

List of values: 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity", 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity", 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity", 'ignore_part_polarity'"ignore_part_polarity""ignore_part_polarity""ignore_part_polarity""ignore_part_polarity""ignore_part_polarity", 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity"

MinContrastMinContrastMinContrastMinContrastMinContrastminContrast (input_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Minimum contrast of the objects in the search images.

Default value: 5

Suggested values: 1, 2, 3, 5, 7, 10, 20, 30, 40

ParamNameParamNameParamNameParamNameParamNameparamName (input_control)  string-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

The generic parameter names.

Default value: []

List of values: [], 'part_size'"part_size""part_size""part_size""part_size""part_size"

ParamValueParamValueParamValueParamValueParamValueparamValue (input_control)  integer-array HTupleHTupleHTupleVARIANTHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*) (Hlong / double / BSTR) (Hlong / double / char*)

Values of the generic parameters.

Default value: []

List of values: [], 'big'"big""big""big""big""big", 'medium'"medium""medium""medium""medium""medium", 'small'"small""small""small""small""small"

ModelIDModelIDModelIDModelIDModelIDmodelID (output_control)  deformable_model HDeformableModel, HTupleHTupleHDeformableModel, HTupleHDeformableModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the model.

Result

If the parameters are valid, the operator create_local_deformable_model_xldcreate_local_deformable_model_xldCreateLocalDeformableModelXldcreate_local_deformable_model_xldCreateLocalDeformableModelXldCreateLocalDeformableModelXld returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised. If the parameter NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels is chosen such that the model contains too few points, the error 8510 is raised.

Possible Predecessors

read_contour_xld_dxfread_contour_xld_dxfReadContourXldDxfread_contour_xld_dxfReadContourXldDxfReadContourXldDxf, edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix, select_contours_xldselect_contours_xldSelectContoursXldselect_contours_xldSelectContoursXldSelectContoursXld

Possible Successors

find_local_deformable_modelfind_local_deformable_modelFindLocalDeformableModelfind_local_deformable_modelFindLocalDeformableModelFindLocalDeformableModel

See also

create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModel

Module

Matching


ClassesClassesClassesClasses | | | | Operators