ClassesClassesClassesClasses | | | | Operators

create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld (Operator)

Name

create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld — Prepare a shape model for matching from XLD contours.

Signature

create_shape_model_xld(Contours : : NumLevels, AngleStart, AngleExtent, AngleStep, Optimization, Metric, MinContrast : ModelID)

Herror create_shape_model_xld(const Hobject Contours, const Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const char* Optimization, const char* Metric, const Hlong MinContrast, Hlong* ModelID)

Herror T_create_shape_model_xld(const Hobject Contours, const Htuple NumLevels, const Htuple AngleStart, const Htuple AngleExtent, const Htuple AngleStep, const Htuple Optimization, const Htuple Metric, const Htuple MinContrast, Htuple* ModelID)

Herror create_shape_model_xld(Hobject Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, Hlong* ModelID)

HShapeModel HXLDCont::CreateShapeModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast) const

HShapeModel HXLDContArray::CreateShapeModelXld(const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast) const

void HShapeModel::CreateShapeModelXld(const HXLDContArray& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast)

void CreateShapeModelXld(const HObject& Contours, const HTuple& NumLevels, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HTuple& Metric, const HTuple& MinContrast, HTuple* ModelID)

void HShapeModel::HShapeModel(const HXLDCont& Contours, const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast)

void HShapeModel::HShapeModel(const HXLDCont& Contours, Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const HString& Optimization, const HString& Metric, Hlong MinContrast)

void HShapeModel::HShapeModel(const HXLDCont& Contours, Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const char* Optimization, const char* Metric, Hlong MinContrast)

void HShapeModel::CreateShapeModelXld(const HXLDCont& Contours, const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast)

void HShapeModel::CreateShapeModelXld(const HXLDCont& Contours, Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const HString& Optimization, const HString& Metric, Hlong MinContrast)

void HShapeModel::CreateShapeModelXld(const HXLDCont& Contours, Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const char* Optimization, const char* Metric, Hlong MinContrast)

HShapeModel HXLDCont::CreateShapeModelXld(const HTuple& NumLevels, double AngleStart, double AngleExtent, const HTuple& AngleStep, const HTuple& Optimization, const HString& Metric, Hlong MinContrast) const

HShapeModel HXLDCont::CreateShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const HString& Optimization, const HString& Metric, Hlong MinContrast) const

HShapeModel HXLDCont::CreateShapeModelXld(Hlong NumLevels, double AngleStart, double AngleExtent, double AngleStep, const char* Optimization, const char* Metric, Hlong MinContrast) const

void HOperatorSetX.CreateShapeModelXld(
[in] IHUntypedObjectX* Contours, [in] VARIANT NumLevels, [in] VARIANT AngleStart, [in] VARIANT AngleExtent, [in] VARIANT AngleStep, [in] VARIANT Optimization, [in] VARIANT Metric, [in] VARIANT MinContrast, [out] VARIANT* ModelID)

void HShapeModelX.CreateShapeModelXld(
[in] IHXLDContX* Contours, [in] VARIANT NumLevels, [in] double AngleStart, [in] double AngleExtent, [in] VARIANT AngleStep, [in] VARIANT Optimization, [in] BSTR Metric, [in] Hlong MinContrast)

IHShapeModelX* HXLDContX.CreateShapeModelXld(
[in] VARIANT NumLevels, [in] double AngleStart, [in] double AngleExtent, [in] VARIANT AngleStep, [in] VARIANT Optimization, [in] BSTR Metric, [in] Hlong MinContrast)

static void HOperatorSet.CreateShapeModelXld(HObject contours, HTuple numLevels, HTuple angleStart, HTuple angleExtent, HTuple angleStep, HTuple optimization, HTuple metric, HTuple minContrast, out HTuple modelID)

public HShapeModel(HXLDCont contours, HTuple numLevels, double angleStart, double angleExtent, HTuple angleStep, HTuple optimization, string metric, int minContrast)

public HShapeModel(HXLDCont contours, int numLevels, double angleStart, double angleExtent, double angleStep, string optimization, string metric, int minContrast)

void HShapeModel.CreateShapeModelXld(HXLDCont contours, HTuple numLevels, double angleStart, double angleExtent, HTuple angleStep, HTuple optimization, string metric, int minContrast)

void HShapeModel.CreateShapeModelXld(HXLDCont contours, int numLevels, double angleStart, double angleExtent, double angleStep, string optimization, string metric, int minContrast)

HShapeModel HXLDCont.CreateShapeModelXld(HTuple numLevels, double angleStart, double angleExtent, HTuple angleStep, HTuple optimization, string metric, int minContrast)

HShapeModel HXLDCont.CreateShapeModelXld(int numLevels, double angleStart, double angleExtent, double angleStep, string optimization, string metric, int minContrast)

Description

The operator create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld creates a shape model used for matching from the XLD contours passed in ContoursContoursContoursContoursContourscontours. The XLD contours represent the grayvalue edges of the object to be searched for. In contrast to the operator create_shape_modelcreate_shape_modelCreateShapeModelcreate_shape_modelCreateShapeModelCreateShapeModel, which creates a shape model from a template image, the operator create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld creates the shape model from XLD contours, i.e., without the use of a template image.

The model is generated for multiple image pyramid levels and is stored in memory. If a complete pregeneration of the model is selected (see below), the model is generated at multiple rotations on each level. The output parameter ModelIDModelIDModelIDModelIDModelIDmodelID is a handle for this model, which is used in subsequent calls to find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel.

The number of pyramid levels is determined with the parameter NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels. It should be chosen as large as possible because by this the time necessary to find the object is significantly reduced. On the other hand, NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels must be chosen such that the model is still recognizable and contains a sufficient number of points (at least four) on the highest pyramid level. If not enough model points are generated, the number of pyramid levels is reduced internally until enough model points are found on the highest pyramid level. If this procedure would lead to a model with no pyramid levels, i.e., if the number of model points is already too small on the lowest pyramid level, create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld returns with an error message. If NumLevelsNumLevelsNumLevelsNumLevelsNumLevelsnumLevels is set to 'auto'"auto""auto""auto""auto""auto", create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld determines the number of pyramid levels automatically. The computed number of pyramid levels can be queried using get_shape_model_paramsget_shape_model_paramsGetShapeModelParamsget_shape_model_paramsGetShapeModelParamsGetShapeModelParams. In rare cases, it might happen that create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld determines a value for the number of pyramid levels that is too large or too small. If the number of pyramid levels is chosen too large, the model may not be recognized in the image or it may be necessary to select very low parameters for MinScore or Greediness in find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel in order to find the model. If the number of pyramid levels is chosen too small, the time required to find the model in find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel may increase. In these cases, the number of pyramid levels should be selected manually.

The parameters AngleStartAngleStartAngleStartAngleStartAngleStartangleStart and AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent determine the range of possible rotations, in which the object can occur in the image during the search. Note that the object can only be found in this range of angles by find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel. The parameter AngleStepAngleStepAngleStepAngleStepAngleStepangleStep determines the step length within the selected range of angles. Hence, if subpixel accuracy is not specified in find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel, this parameter specifies the accuracy that is achievable for the angles in find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel. AngleStepAngleStepAngleStepAngleStepAngleStepangleStep should be chosen based on the size of the object. Smaller models do not possess many different discrete rotations in the image, and hence AngleStepAngleStepAngleStepAngleStepAngleStepangleStep should be chosen larger for smaller models. If AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent is not an integer multiple of AngleStepAngleStepAngleStepAngleStepAngleStepangleStep, AngleStepAngleStepAngleStepAngleStepAngleStepangleStep is modified accordingly. To ensure that for model instances without rotation angle values of exactly 0.0 are returned by find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel, the range of possible rotations is modified as follows: If there is no positive integer value n such that AngleStartAngleStartAngleStartAngleStartAngleStartangleStart plus n times AngleStepAngleStepAngleStepAngleStepAngleStepangleStep is exactly 0.0, AngleStartAngleStartAngleStartAngleStartAngleStartangleStart is decreased by up to AngleStepAngleStepAngleStepAngleStepAngleStepangleStep and AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent is increased by AngleStepAngleStepAngleStepAngleStepAngleStepangleStep.

If a complete pregeneration of the model is selected (see below), the model is pre-generated for the selected angle range and stored in memory. The memory required to store the model is proportional to the number of angle steps and the number of points in the model. Hence, if AngleStepAngleStepAngleStepAngleStepAngleStepangleStep is too small or AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent too big, it may happen that the model no longer fits into the (virtual) memory. In this case, either AngleStepAngleStepAngleStepAngleStepAngleStepangleStep must be enlarged or AngleExtentAngleExtentAngleExtentAngleExtentAngleExtentangleExtent must be reduced. In any case, it is desirable that the model completely fits into the main memory, because this avoids paging by the operating system, and hence the time to find the object will be much smaller. Since angles can be determined with subpixel resolution by find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel, AngleStepAngleStepAngleStepAngleStepAngleStepangleStep >= 1 can be selected for models of a diameter smaller than about 200 pixels. If AngleStepAngleStepAngleStepAngleStepAngleStepangleStep = 'auto'"auto""auto""auto""auto""auto" is selected, create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld automatically determines a suitable angle step length based on the size of the model. The automatically computed angle step length can be queried using get_shape_model_paramsget_shape_model_paramsGetShapeModelParamsget_shape_model_paramsGetShapeModelParamsGetShapeModelParams.

If a complete pregeneration of the model is not selected, the model is only created in a reference pose on each pyramid level. In this case, the model must be transformed to the different angles and scales at runtime in find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel. Because of this, the recognition of the model might require slightly more time.

For particularly large models, it may be useful to reduce the number of model points by setting OptimizationOptimizationOptimizationOptimizationOptimizationoptimization to a value different from 'none'"none""none""none""none""none". If OptimizationOptimizationOptimizationOptimizationOptimizationoptimization = 'none'"none""none""none""none""none", all model points are stored. In all other cases, the number of points is reduced according to the value of OptimizationOptimizationOptimizationOptimizationOptimizationoptimization. If the number of points is reduced, it may be necessary in find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel to set the parameter Greediness to a smaller value, e.g., 0.7 or 0.8. For small models, the reduction of the number of model points does not result in a speed-up of the search because in this case usually significantly more potential instances of the model must be examined. If OptimizationOptimizationOptimizationOptimizationOptimizationoptimization is set to 'auto'"auto""auto""auto""auto""auto", create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld automatically determines the reduction of the number of model points.

Optionally, a second value can be passed in OptimizationOptimizationOptimizationOptimizationOptimizationoptimization. This value determines whether the model is pregenerated completely or not. To do so, the second value of OptimizationOptimizationOptimizationOptimizationOptimizationoptimization must be set to either 'pregeneration'"pregeneration""pregeneration""pregeneration""pregeneration""pregeneration" or 'no_pregeneration'"no_pregeneration""no_pregeneration""no_pregeneration""no_pregeneration""no_pregeneration". If the second value is not used (i.e., if only one value is passed), the mode that is set with set_system('pregenerate_shape_models',...)set_system("pregenerate_shape_models",...)SetSystem("pregenerate_shape_models",...)set_system("pregenerate_shape_models",...)SetSystem("pregenerate_shape_models",...)SetSystem("pregenerate_shape_models",...) is used. With the default value ('pregenerate_shape_models'"pregenerate_shape_models""pregenerate_shape_models""pregenerate_shape_models""pregenerate_shape_models""pregenerate_shape_models" = 'false'"false""false""false""false""false"), the model is not pregenerated completely. The complete pregeneration of the model normally leads to slightly lower runtimes because the model does not need to be transformed at runtime. However, in this case, the memory requirements and the time required to create the model are significantly higher. It should also be noted that it cannot be expected that the two modes return exactly identical results because transforming the model at runtime necessarily leads to different internal data for the transformed models than pregenerating the transformed models. For example, if the model is not pregenerated completely, find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel typically returns slightly lower scores, which may require setting a slightly lower value for MinScore than for a completely pregenerated model. Furthermore, the poses obtained by interpolation may differ slightly in the two modes. If maximum accuracy is desired, the pose of the model should be determined by least-squares adjustment.

With MinContrastMinContrastMinContrastMinContrastMinContrastminContrast, it can be determined which contrast the object edges must at least have in the recognition performed by find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel. In other words, this parameter separates the object from the noise in the image. Therefore, a good choice is the range of gray value changes caused by the noise in the image. If, for example, the gray values fluctuate within a range of 10 gray levels, MinContrastMinContrastMinContrastMinContrastMinContrastminContrast should be set to 10. If multichannel images are used for the model and the search images, and if the parameter MetricMetricMetricMetricMetricmetric is set to 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity" (see below) the noise in one channel must be multiplied by the square root of the number of channels to determine MinContrastMinContrastMinContrastMinContrastMinContrastminContrast. If, for example, the gray values fluctuate within a range of 10 gray levels in a single channel and the image is a three-channel image MinContrastMinContrastMinContrastMinContrastMinContrastminContrast should be set to 17. If the model should be recognized in very low contrast images, MinContrastMinContrastMinContrastMinContrastMinContrastminContrast must be set to a correspondingly small value. If the model should be recognized even if it is severely occluded, MinContrastMinContrastMinContrastMinContrastMinContrastminContrast should be slightly larger than the range of gray value fluctuations created by noise in order to ensure that the position and rotation of the model are extracted robustly and accurately by find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel.

The parameter MetricMetricMetricMetricMetricmetric determines the conditions under which the model is recognized in the image. If MetricMetricMetricMetricMetricmetric = 'use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity", the object in the image and the model must have the same contrast. If, for example, the model is a bright object on a dark background, the object is found only if it is also brighter than the background. If MetricMetricMetricMetricMetricmetric = 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity", the object is found in the image also if the contrast reverses globally. In the above example, the object hence is also found if it is darker than the background. The runtime of find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel will increase slightly in this case. If MetricMetricMetricMetricMetricmetric = 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity", the model is found even if the contrast changes locally. This mode can, for example, be useful if the object consists of a part with medium gray value, within which either darker or brighter sub-objects lie. Since in this case the runtime of find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel increases significantly, it is usually better to create several models that reflect the possible contrast variations of the object with create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld, and to match them simultaneously with find_shape_modelsfind_shape_modelsFindShapeModelsfind_shape_modelsFindShapeModelsFindShapeModels. The above three metrics can only be applied to single-channel images. If a multichannel image is used as the model image or as the search image only the first channel will be used (and no error message will be returned). If MetricMetricMetricMetricMetricmetric = 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity", the model is found even if the color contrast changes locally. This is, for example, the case if parts of the object can change their color, e.g., from red to green. In particular, this mode is useful if it is not known in advance in which channels the object is visible. In this mode, the runtime of find_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel can also increase significantly. The metric 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity" can be used for images with an arbitrary number of channels. If it is used for single-channel images it has the same effect as 'ignore_local_polarity'"ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity""ignore_local_polarity". It should be noted that for MetricMetricMetricMetricMetricmetric = 'ignore_color_polarity'"ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity""ignore_color_polarity" the channels do not need to contain a spectral subdivision of the light (like in an RGB image). The channels can, for example, also contain images of the same object that were obtained by illuminating the object from different directions. Note that the first two metrics ('use_polarity'"use_polarity""use_polarity""use_polarity""use_polarity""use_polarity" and 'ignore_global_polarity'"ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity""ignore_global_polarity") can only be selected if all ContoursContoursContoursContoursContourscontours provide the attribute 'edge_direction'"edge_direction""edge_direction""edge_direction""edge_direction""edge_direction", which defines the polarity of the edges. This attribute is available for contours created, e.g., with edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix with the parameter MethodMethodMethodMethodMethodmethod set to, e.g., 'canny'"canny""canny""canny""canny""canny". Otherwise, these two metrics can be selected with the operator set_shape_model_metricset_shape_model_metricSetShapeModelMetricset_shape_model_metricSetShapeModelMetricSetShapeModelMetric, which determines the polarity of the edges from an image.

The center of gravity of the smallest surrounding rectangle of the ContoursContoursContoursContoursContourscontours that is parallel to the coordinate axes is used as the origin (reference point) of the model. A different origin can be set with set_shape_model_originset_shape_model_originSetShapeModelOriginset_shape_model_originSetShapeModelOriginSetShapeModelOrigin.

Attention

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

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

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

Kind of optimization and optionally method used for generating the model.

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

List of values: 'auto'"auto""auto""auto""auto""auto", 'no_pregeneration'"no_pregeneration""no_pregeneration""no_pregeneration""no_pregeneration""no_pregeneration", '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", 'pregeneration'"pregeneration""pregeneration""pregeneration""pregeneration""pregeneration"

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", '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

ModelIDModelIDModelIDModelIDModelIDmodelID (output_control)  shape_model HShapeModel, HTupleHTupleHShapeModel, HTupleHShapeModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the model.

Result

If the parameters are valid, the operator create_shape_model_xldcreate_shape_model_xldCreateShapeModelXldcreate_shape_model_xldCreateShapeModelXldCreateShapeModelXld 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_shape_modelfind_shape_modelFindShapeModelfind_shape_modelFindShapeModelFindShapeModel, find_shape_modelsfind_shape_modelsFindShapeModelsfind_shape_modelsFindShapeModelsFindShapeModels, get_shape_model_paramsget_shape_model_paramsGetShapeModelParamsget_shape_model_paramsGetShapeModelParamsGetShapeModelParams, clear_shape_modelclear_shape_modelClearShapeModelclear_shape_modelClearShapeModelClearShapeModel, write_shape_modelwrite_shape_modelWriteShapeModelwrite_shape_modelWriteShapeModelWriteShapeModel, set_shape_model_originset_shape_model_originSetShapeModelOriginset_shape_model_originSetShapeModelOriginSetShapeModelOrigin, set_shape_model_paramset_shape_model_paramSetShapeModelParamset_shape_model_paramSetShapeModelParamSetShapeModelParam, set_shape_model_metricset_shape_model_metricSetShapeModelMetricset_shape_model_metricSetShapeModelMetricSetShapeModelMetric

Alternatives

create_scaled_shape_model_xldcreate_scaled_shape_model_xldCreateScaledShapeModelXldcreate_scaled_shape_model_xldCreateScaledShapeModelXldCreateScaledShapeModelXld, create_aniso_shape_model_xldcreate_aniso_shape_model_xldCreateAnisoShapeModelXldcreate_aniso_shape_model_xldCreateAnisoShapeModelXldCreateAnisoShapeModelXld

See also

set_systemset_systemSetSystemset_systemSetSystemSetSystem, get_systemget_systemGetSystemget_systemGetSystemGetSystem

Module

Matching


ClassesClassesClassesClasses | | | | Operators