ClassesClasses | | Operators

create_local_deformable_modelT_create_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModel (Operator)

Name

create_local_deformable_modelT_create_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModel — Creates a deformable model for local, deformable matching.

Signature

create_local_deformable_model(Template : : NumLevels, AngleStart, AngleExtent, AngleStep, ScaleRMin, ScaleRMax, ScaleRStep, ScaleCMin, ScaleCMax, ScaleCStep, Optimization, Metric, Contrast, MinContrast, GenParamName, GenParamValue : ModelID)

Herror T_create_local_deformable_model(const Hobject Template, 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 Contrast, const Htuple MinContrast, const Htuple GenParamName, const Htuple GenParamValue, Htuple* ModelID)

void CreateLocalDeformableModel(const HObject& Template, 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& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* ModelID)

void HDeformableModel::CreateLocalDeformableModel(const HImage& Template, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDeformableModel::CreateLocalDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)

void HDeformableModel::CreateLocalDeformableModel(const HImage& Template, Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue)

HDeformableModel HImage::CreateLocalDeformableModel(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, double ScaleRMin, const HTuple& ScaleRMax, const HTuple& ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, const HTuple& ScaleCStep, const HTuple& Optimization, const HString& Metric, const HTuple& Contrast, const HTuple& MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDeformableModel HImage::CreateLocalDeformableModel(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const HString& Optimization, const HString& Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const

HDeformableModel HImage::CreateLocalDeformableModel(Hlong NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, double AngleStep, double ScaleRMin, const HTuple& ScaleRMax, double ScaleRStep, double ScaleCMin, const HTuple& ScaleCMax, double ScaleCStep, const char* Optimization, const char* Metric, const HTuple& Contrast, Hlong MinContrast, const HTuple& GenParamName, const HTuple& GenParamValue) const

static void HOperatorSet.CreateLocalDeformableModel(HObject template, 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 contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue, out HTuple modelID)

void HDeformableModel.CreateLocalDeformableModel(HImage template, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue)

void HDeformableModel.CreateLocalDeformableModel(HImage template, int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, HTuple contrast, int minContrast, HTuple genParamName, HTuple genParamValue)

HDeformableModel HImage.CreateLocalDeformableModel(HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, double scaleRMin, HTuple scaleRMax, HTuple scaleRStep, double scaleCMin, HTuple scaleCMax, HTuple scaleCStep, HTuple optimization, string metric, HTuple contrast, HTuple minContrast, HTuple genParamName, HTuple genParamValue)

HDeformableModel HImage.CreateLocalDeformableModel(int numLevels, HTuple angleStart, HTuple angleExtent, double angleStep, double scaleRMin, HTuple scaleRMax, double scaleRStep, double scaleCMin, HTuple scaleCMax, double scaleCStep, string optimization, string metric, HTuple contrast, int minContrast, HTuple genParamName, HTuple genParamValue)

Description

The operator create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModelCreateLocalDeformableModel prepares a template, which is passed in the image TemplateTemplateTemplateTemplatetemplate, as a deformable model used for local deformable matching. The ROI of the model is passed as the domain of TemplateTemplateTemplateTemplatetemplate.

The local deformable matching can be used to detect an object that is distorted by a local deformation. This is similar to create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel or create_planar_calib_deformable_modelcreate_planar_calib_deformable_modelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModel which require that the object is rigid. Further, it is an alternative to the mode 'max_deformation' in find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModel. Here, the model remains rigid but is able to tolerate small deformations. In contrast to find_shape_modelfind_shape_modelFindShapeModelFindShapeModelFindShapeModel, create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModelCreateLocalDeformableModel can be used to estimate the deformation and rectify the image area where the object is found. Further, create_local_deformable_modelcreate_local_deformable_modelCreateLocalDeformableModelCreateLocalDeformableModelCreateLocalDeformableModel can cope with bigger deformations.

As described in create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel, the origin (reference point) of the model is defined as the center of gravity of the domain (region) of the model image TemplateTemplateTemplateTemplatetemplate. Further, the axis-aligned enclosing rectangle of the domain of the TemplateTemplateTemplateTemplatetemplate is used to determine the area of the search image that is rectified in calls of find_local_deformable_modelfind_local_deformable_modelFindLocalDeformableModelFindLocalDeformableModelFindLocalDeformableModel.

For further explanation on the parameters used for the creation of a local deformable model we refer to the description of create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel. Note, that the parameters of the actual deformation are set with the call of find_local_deformable_modelfind_local_deformable_modelFindLocalDeformableModelFindLocalDeformableModelFindLocalDeformableModel.

Execution Information

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

TemplateTemplateTemplateTemplatetemplate (input_object)  (multichannel-)image objectHImageHImageHobject (byte / uint2)

Input image whose domain will be used to create the model.

NumLevelsNumLevelsNumLevelsNumLevelsnumLevels (input_control)  integer HTupleHTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Maximum number of pyramid levels.

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

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

AngleStartAngleStartAngleStartAngleStartangleStart (input_control)  angle.rad-array HTupleHTupleHtuple (real) (double) (double) (double)

This parameter is not used.

Default value: []

AngleExtentAngleExtentAngleExtentAngleExtentangleExtent (input_control)  angle.rad-array HTupleHTupleHtuple (real) (double) (double) (double)

This parameter is not used.

Default value: []

AngleStepAngleStepAngleStepAngleStepangleStep (input_control)  angle.rad HTupleHTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

Step length of the angles (resolution).

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

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

Restriction: AngleStep >= 0

ScaleRMinScaleRMinScaleRMinScaleRMinscaleRMin (input_control)  number HTupleHTupleHtuple (real) (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

ScaleRMaxScaleRMaxScaleRMaxScaleRMaxscaleRMax (input_control)  number-array HTupleHTupleHtuple (real) (double) (double) (double)

This parameter is not used.

Default value: []

ScaleRStepScaleRStepScaleRStepScaleRStepscaleRStep (input_control)  number HTupleHTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

Scale step length (resolution) in row direction.

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

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

Restriction: ScaleRStep >= 0

ScaleCMinScaleCMinScaleCMinScaleCMinscaleCMin (input_control)  number HTupleHTupleHtuple (real) (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

ScaleCMaxScaleCMaxScaleCMaxScaleCMaxscaleCMax (input_control)  number-array HTupleHTupleHtuple (real) (double) (double) (double)

This parameter is not used.

Default value: []

ScaleCStepScaleCStepScaleCStepScaleCStepscaleCStep (input_control)  number HTupleHTupleHtuple (real / string) (double / string) (double / HString) (double / char*)

Scale step length (resolution) in column direction.

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

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

Restriction: ScaleCStep >= 0

OptimizationOptimizationOptimizationOptimizationoptimization (input_control)  string(-array) HTupleHTupleHtuple (string) (string) (HString) (char*)

Kind of optimization used for generating the model.

Default value: 'none' "none" "none" "none" "none"

List of values: 'auto'"auto""auto""auto""auto", 'none'"none""none""none""none", '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_medium'"point_reduction_medium""point_reduction_medium""point_reduction_medium""point_reduction_medium"

MetricMetricMetricMetricmetric (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Match metric.

Default value: 'use_polarity' "use_polarity" "use_polarity" "use_polarity" "use_polarity"

List of values: '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_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", 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity"

ContrastContrastContrastContrastcontrast (input_control)  number-array HTupleHTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Thresholds or hysteresis thresholds for the contrast of the object in the template image.

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

Suggested values: 'auto'"auto""auto""auto""auto", 10, 20, 30, 40, 60, 80, 100, 120, 140, 160

MinContrastMinContrastMinContrastMinContrastminContrast (input_control)  number HTupleHTupleHtuple (integer / string) (int / long / string) (Hlong / HString) (Hlong / char*)

Minimum contrast of the objects in the search images.

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

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

Restriction: MinContrast < Contrast

GenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  string-array HTupleHTupleHtuple (string) (string) (HString) (char*)

The generic parameter names.

Default value: []

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

GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  integer-array HTupleHTupleHtuple (integer / real / string) (int / long / double / string) (Hlong / double / HString) (Hlong / double / char*)

Values of the generic parameters.

Default value: []

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

ModelIDModelIDModelIDModelIDmodelID (output_control)  deformable_model HDeformableModel, HTupleHTupleHtuple (integer) (IntPtr) (Hlong) (Hlong)

Handle of the model.

Result

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

Possible Predecessors

determine_deformable_model_paramsdetermine_deformable_model_paramsDetermineDeformableModelParamsDetermineDeformableModelParamsDetermineDeformableModelParams

Possible Successors

set_deformable_model_originset_deformable_model_originSetDeformableModelOriginSetDeformableModelOriginSetDeformableModelOrigin, set_deformable_model_paramset_deformable_model_paramSetDeformableModelParamSetDeformableModelParamSetDeformableModelParam, get_deformable_model_contoursget_deformable_model_contoursGetDeformableModelContoursGetDeformableModelContoursGetDeformableModelContours, find_local_deformable_modelfind_local_deformable_modelFindLocalDeformableModelFindLocalDeformableModelFindLocalDeformableModel, get_deformable_model_paramsget_deformable_model_paramsGetDeformableModelParamsGetDeformableModelParamsGetDeformableModelParams, write_deformable_modelwrite_deformable_modelWriteDeformableModelWriteDeformableModelWriteDeformableModel, clear_deformable_modelclear_deformable_modelClearDeformableModelClearDeformableModelClearDeformableModel

Alternatives

read_deformable_modelread_deformable_modelReadDeformableModelReadDeformableModelReadDeformableModel

See also

create_planar_uncalib_deformable_modelcreate_planar_uncalib_deformable_modelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModelCreatePlanarUncalibDeformableModel, create_planar_calib_deformable_modelcreate_planar_calib_deformable_modelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModelCreatePlanarCalibDeformableModel

Module

Matching


ClassesClasses | | Operators