ClassesClassesClassesClasses | | | | Operators

set_metrology_object_paramset_metrology_object_paramSetMetrologyObjectParamset_metrology_object_paramSetMetrologyObjectParamSetMetrologyObjectParam (Operator)

Name

set_metrology_object_paramset_metrology_object_paramSetMetrologyObjectParamset_metrology_object_paramSetMetrologyObjectParamSetMetrologyObjectParam — Set parameters for the metrology objects of a metrology model.

Signature

set_metrology_object_param( : : MetrologyHandle, Indices, GenParamName, GenParamValue : )

Herror set_metrology_object_param(const Hlong MetrologyHandle, const char* Indices, const char* GenParamName, const char* GenParamValue)

Herror T_set_metrology_object_param(const Htuple MetrologyHandle, const Htuple Indices, const Htuple GenParamName, const Htuple GenParamValue)

Herror set_metrology_object_param(const HTuple& MetrologyHandle, const HTuple& Indices, const HTuple& GenParamName, const HTuple& GenParamValue)

void HMetrologyModel::SetMetrologyObjectParam(const HTuple& Indices, const HTuple& GenParamName, const HTuple& GenParamValue) const

void SetMetrologyObjectParam(const HTuple& MetrologyHandle, const HTuple& Indices, const HTuple& GenParamName, const HTuple& GenParamValue)

void HMetrologyModel::SetMetrologyObjectParam(const HTuple& Indices, const HTuple& GenParamName, const HTuple& GenParamValue) const

void HMetrologyModel::SetMetrologyObjectParam(const HString& Indices, const HString& GenParamName, const HString& GenParamValue) const

void HMetrologyModel::SetMetrologyObjectParam(const char* Indices, const char* GenParamName, const char* GenParamValue) const

void HOperatorSetX.SetMetrologyObjectParam(
[in] VARIANT MetrologyHandle, [in] VARIANT Indices, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

void HMetrologyModelX.SetMetrologyObjectParam(
[in] VARIANT Indices, [in] VARIANT GenParamName, [in] VARIANT GenParamValue)

static void HOperatorSet.SetMetrologyObjectParam(HTuple metrologyHandle, HTuple indices, HTuple genParamName, HTuple genParamValue)

void HMetrologyModel.SetMetrologyObjectParam(HTuple indices, HTuple genParamName, HTuple genParamValue)

void HMetrologyModel.SetMetrologyObjectParam(string indices, string genParamName, string genParamValue)

Description

set_metrology_object_paramset_metrology_object_paramSetMetrologyObjectParamset_metrology_object_paramSetMetrologyObjectParamSetMetrologyObjectParam is used to set or change the different parameters of an metrology object (see create_metrology_modelcreate_metrology_modelCreateMetrologyModelcreate_metrology_modelCreateMetrologyModelCreateMetrologyModel for the basic principle of 2D metrology).

The metrology model is defined by the handle MetrologyHandleMetrologyHandleMetrologyHandleMetrologyHandleMetrologyHandlemetrologyHandle. The parameter IndicesIndicesIndicesIndicesIndicesindices specifies the metrology objects for which the parameters are set. The parameters of all metrology objects are set if the parameter IndicesIndicesIndicesIndicesIndicesindices is set to 'all'"all""all""all""all""all". All parameters can also be set when creating an metrology object with add_metrology_object_circle_measureadd_metrology_object_circle_measureAddMetrologyObjectCircleMeasureadd_metrology_object_circle_measureAddMetrologyObjectCircleMeasureAddMetrologyObjectCircleMeasure, add_metrology_object_ellipse_measureadd_metrology_object_ellipse_measureAddMetrologyObjectEllipseMeasureadd_metrology_object_ellipse_measureAddMetrologyObjectEllipseMeasureAddMetrologyObjectEllipseMeasure, add_metrology_object_line_measureadd_metrology_object_line_measureAddMetrologyObjectLineMeasureadd_metrology_object_line_measureAddMetrologyObjectLineMeasureAddMetrologyObjectLineMeasure, or add_metrology_object_rectangle2_measureadd_metrology_object_rectangle2_measureAddMetrologyObjectRectangle2Measureadd_metrology_object_rectangle2_measureAddMetrologyObjectRectangle2MeasureAddMetrologyObjectRectangle2Measure. The current configuration of the metrology model can be accessed with get_metrology_object_paramget_metrology_object_paramGetMetrologyObjectParamget_metrology_object_paramGetMetrologyObjectParamGetMetrologyObjectParam. All parameters that can be set with set_metrology_object_paramset_metrology_object_paramSetMetrologyObjectParamset_metrology_object_paramSetMetrologyObjectParamSetMetrologyObjectParam can be reset with reset_metrology_object_paramreset_metrology_object_paramResetMetrologyObjectParamreset_metrology_object_paramResetMetrologyObjectParamResetMetrologyObjectParam.

In the following all generic parameters with the default values are listed. But note that for a lot of applications the default values are sufficient and no adjustment is necessary. The following values for GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue are possible - ordered by different categories:

Creating measure regions:

'measure_length1'"measure_length1""measure_length1""measure_length1""measure_length1""measure_length1":

The value of this parameter specifies the half length of the measure regions perpendicular to the metrology object boundary. Is is equivalent to the measure tolerance. The unit of the value is pixel.

List of values: 10.0, 20.0, 30.0

Default value: 20.0

Restriction: 'measure_length1'"measure_length1""measure_length1""measure_length1""measure_length1""measure_length1" >= 1.0

'measure_length2'"measure_length2""measure_length2""measure_length2""measure_length2""measure_length2":

The value of this parameter specifies the half length of the measure regions tangential to the metrology object boundary. The unit of the value is pixel.

List of values: 3.0, 5.0, 10.0

Default value: 5.0

Restriction: 'measure_length2'"measure_length2""measure_length2""measure_length2""measure_length2""measure_length2" >= 0.0

'measure_distance'"measure_distance""measure_distance""measure_distance""measure_distance""measure_distance":

The value of this parameter specifies the desired distance between the centers of two measure regions. If the value leads to too few measure regions, the parameter has no influence and the number of measure regions will be increased to the minimum required number of measure regions. For an metrology object of the type circle this number is 3. For an metrology object of the type ellipse this number is 5. For an metrology object of the type line this number is 2. For an metrology object of the type rectangle this number is 2 per side, i.e., in total 8. If this value is set, the parameter 'num_measures'"num_measures""num_measures""num_measures""num_measures""num_measures" has no influence. The unit of the value is pixel.

List of values: 5.0, 15.0, 20.0, 30.0

Default value: 10.0

'num_measures'"num_measures""num_measures""num_measures""num_measures""num_measures":

The value of this parameter specifies the desired number of measure regions. If the value leads to too few measure regions, the parameter has no influence and the number of measure regions will be increased to the minimum required number of measure regions. For an metrology object of the type circle this number is 3. For an metrology object of the type ellipse this number is 5. For an metrology object of the type line this number is 2. For an metrology object of the type rectangle this number is 2 per side, i.e., in total 8. If this value is set, the parameter 'measure_distance'"measure_distance""measure_distance""measure_distance""measure_distance""measure_distance" has no influence.

List of values: 8, 10, 16, 20, 30, 50, 100

Edge detection:

'measure_sigma'"measure_sigma""measure_sigma""measure_sigma""measure_sigma""measure_sigma":

The parameter specifies the sigma for the Gaussian smoothing. The meaning, the use, and the default value of this parameter are described with the operator measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos by the parameter SigmaSigmaSigmaSigmaSigmasigma.

'measure_threshold'"measure_threshold""measure_threshold""measure_threshold""measure_threshold""measure_threshold":

The parameter specifies the minimum edge amplitude. The meaning, the use, and the default value of this parameter are described with the operator measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos by the parameter ThresholdThresholdThresholdThresholdThresholdthreshold.

'measure_select'"measure_select""measure_select""measure_select""measure_select""measure_select":

The parameter specifies the selection of end points of the edges. The meaning, the use, and the default value of this parameter are described with the operator measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos by the parameter SelectSelectSelectSelectSelectselect.

'measure_transition'"measure_transition""measure_transition""measure_transition""measure_transition""measure_transition":

The parameter specifies the use of dark/light or light/dark edges. The meaning and the use of the values 'all'"all""all""all""all""all", 'positive'"positive""positive""positive""positive""positive", and 'negative'"negative""negative""negative""negative""negative" for the parameter 'measure_transition'"measure_transition""measure_transition""measure_transition""measure_transition""measure_transition" is described with the operator measure_posmeasure_posMeasurePosmeasure_posMeasurePosMeasurePos by the parameter TransitionTransitionTransitionTransitionTransitiontransition. Additionally, 'measure_transition'"measure_transition""measure_transition""measure_transition""measure_transition""measure_transition" can be set to the value 'uniform'"uniform""uniform""uniform""uniform""uniform". Then, all positive edges (dark/light edges) and all negative edges (light/dark edges) are detected by the edge detection but when fitting the geometric shapes, the edges with different edge types are used separately, i.e., for each instance of a geometric shape either only the positive edges or the negative edges are used.

The measure direction within the measure regions is from the inside to the outside of the metrology object for objects of the types circle, ellipse, or rectangle. For metrology objects of the type line measure direction within the measure regions is from the left to the right, seen from the first point of the line (see RowBeginRowBeginRowBeginRowBeginRowBeginrowBegin and ColumnBeginColumnBeginColumnBeginColumnBeginColumnBegincolumnBegin of the operator add_metrology_object_line_measureadd_metrology_object_line_measureAddMetrologyObjectLineMeasureadd_metrology_object_line_measureAddMetrologyObjectLineMeasureAddMetrologyObjectLineMeasure).

List of values: 'all'"all""all""all""all""all", 'negative'"negative""negative""negative""negative""negative", 'positive'"positive""positive""positive""positive""positive", 'uniform'"uniform""uniform""uniform""uniform""uniform"

Default value: 'all'"all""all""all""all""all"

'measure_interpolation'"measure_interpolation""measure_interpolation""measure_interpolation""measure_interpolation""measure_interpolation":

The parameter specifies the type of interpolation to be used. The meaning, the use and the default value of this parameter is described with the operator gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2 by the parameter InterpolationInterpolationInterpolationInterpolationInterpolationinterpolation.

Fitting the geometric shapes:

'min_score'"min_score""min_score""min_score""min_score""min_score":

The parameter determines what score a potential instance must at least have to be regarded as a valid instance of the metrology object. The score is the number of detected edges that are used to compute the results divided by the maximum number of measure regions (see apply_metrology_modelapply_metrology_modelApplyMetrologyModelapply_metrology_modelApplyMetrologyModelApplyMetrologyModel). If it can be expected that all edges of the metrology object are present, the parameter 'min_score'"min_score""min_score""min_score""min_score""min_score" can be set to a value as high as 0.8 or even 0.9. Note that in images with a high degree of clutter or strong background texture the parameter 'min_score'"min_score""min_score""min_score""min_score""min_score" should be set to a value not much lower than 0.7 since otherwise false instances of an metrology object could be found.

List of values: 0.5, 0.7, 0.9

Default value: 0.7

'num_instances'"num_instances""num_instances""num_instances""num_instances""num_instances":

The parameter specifies the maximum number of successfully fitted instances of each metrology object after which the fitting will stop (see apply_metrology_modelapply_metrology_modelApplyMetrologyModelapply_metrology_modelApplyMetrologyModelApplyMetrologyModel). Successfully fitted instances of the metrology objects must have a score of at least the value of 'min_score'"min_score""min_score""min_score""min_score""min_score". List of values: 1, 2, 3, 4

Default value: 1

'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations":

The RANSAC algorithm estimates the number of iterations necessary for fitting the requested geometric shape. The estimation is based on the extracted edge data and the complexity of the shape. When setting the value of the parameter 'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations", an upper limit for the computed number of iterations is defined. The number of iterations is still estimated by the RANSAC algorithm but cannot exceed the value of 'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations". Setting this parameter can be helpful, if the quality of the fitting is not as important as observing time limits. However, if 'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations" is set too low, the algorithm will return low-quality or no results.

By default, 'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations" is set to -1, indicating that no additional upper limit is set for the number of iterations of the RANSAC algorithm.

List of values: 10, 100, 1000

Default value: -1

'rand_seed'"rand_seed""rand_seed""rand_seed""rand_seed""rand_seed":

The parameter specifies the seed for the random number generator for the RANSAC algorithm that is used by the selection of the edges the in operator apply_metrology_modelapply_metrology_modelApplyMetrologyModelapply_metrology_modelApplyMetrologyModelApplyMetrologyModel. If the value of the parameter 'rand_seed'"rand_seed""rand_seed""rand_seed""rand_seed""rand_seed" is set to a number unequal to the value 0, the operator yields the same result on every call with the same parameters, because the internally used random number generator is initialized with the value of the parameter 'rand_seed'"rand_seed""rand_seed""rand_seed""rand_seed""rand_seed".

If the parameter 'rand_seed'"rand_seed""rand_seed""rand_seed""rand_seed""rand_seed" is set to the value 0, the random number generator is initialized with the current time. In this case, the results are not reproducible.

List of values: 0, 1, 42

Default value: 42

'instances_outside_measure_regions'"instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions":

The parameter specifies the validation of the results of measurements. If the value of the parameter 'instances_outside_measure_regions'"instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions" is set to the value 'false'"false""false""false""false""false", only resulting instances of an metrology object are valid that are inside the major axis of the measure regions of this metrology object. Instances which are not valid are not stored. If the value of the parameter 'instances_outside_measure_regions'"instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions" is set to the value 'true'"true""true""true""true""true", all instances of an metrology object are valid.

List of values: 'true'"true""true""true""true""true", 'false'"false""false""false""false""false"

Default value: 'false'"false""false""false""false""false"

Calibration:

'camera_param'"camera_param""camera_param""camera_param""camera_param""camera_param":

The internal camera parameters. To perform calibrated measurements in metric coordinates, the values of the internal camera parameters must be set together with the 3D pose of the measurement plane (see write_cam_parwrite_cam_parWriteCamParwrite_cam_parWriteCamParWriteCamPar for the sequence of the parameters and the underlying camera model). In many cases, internal camera parameters are the result of calibrating the camera with the operator calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras. If 'camera_param'"camera_param""camera_param""camera_param""camera_param""camera_param" is set to [], the internal camera parameters are discarded. If internal camera parameters and 3D pose of the world coordinate system are set, apply_metrology_modelapply_metrology_modelApplyMetrologyModelapply_metrology_modelApplyMetrologyModelApplyMetrologyModel calculates the results in metric coordinates. The value of IndicesIndicesIndicesIndicesIndicesindices should be set to 'all'"all""all""all""all""all" when specifying the camera parameters. Only one set of internal camera parameters for each metrology model is allowed.

Default value: []

'world_pose'"world_pose""world_pose""world_pose""world_pose""world_pose":

The 3D pose of the measurement plane in camera coordinates.

To perform calibrated measurements in metric coordinates, the values of the internal camera parameters must be set together with the 3D pose of the measurement plane (see write_cam_parwrite_cam_parWriteCamParwrite_cam_parWriteCamParWriteCamPar for the sequence of the parameters and the underlying camera model). In many cases, world coordinate systems are the result of calibrating the camera with the operator calibrate_camerascalibrate_camerasCalibrateCamerascalibrate_camerasCalibrateCamerasCalibrateCameras. If 'world_pose'"world_pose""world_pose""world_pose""world_pose""world_pose" is set to [], the values of the world coordinate system are discarded. If internal camera parameters and 3D pose of the world coordinate system are set, apply_metrology_modelapply_metrology_modelApplyMetrologyModelapply_metrology_modelApplyMetrologyModelApplyMetrologyModel calculates the results in metric coordinates. Note, that the measurement plane should not be tilted. Only one set of internal camera parameters for each metrology model is allowed.

Default value: []

Attention

A metrology model 'MetrologyHandle'"MetrologyHandle""MetrologyHandle""MetrologyHandle""MetrologyHandle""MetrologyHandle" cannot be shared between two or more user's threads. Different metrology models can be used independently and safely in different threads.

Parallelization

Parameters

MetrologyHandleMetrologyHandleMetrologyHandleMetrologyHandleMetrologyHandlemetrologyHandle (input_control)  metrology_model HMetrologyModel, HTupleHTupleHMetrologyModel, HTupleHMetrologyModelX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Handle of the metrology model.

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

Indices of the metrology objects.

Default value: 'all' "all" "all" "all" "all" "all"

Suggested values: 'all'"all""all""all""all""all", 0, 1, 2

GenParamNameGenParamNameGenParamNameGenParamNameGenParamNamegenParamName (input_control)  attribute.name(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Names of the generic parameters.

Default value: 'num_instances' "num_instances" "num_instances" "num_instances" "num_instances" "num_instances"

List of values: 'camera_param'"camera_param""camera_param""camera_param""camera_param""camera_param", 'instances_outside_measure_regions'"instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions""instances_outside_measure_regions", 'max_num_iterations'"max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations""max_num_iterations", 'measure_distance'"measure_distance""measure_distance""measure_distance""measure_distance""measure_distance", 'measure_interpolation'"measure_interpolation""measure_interpolation""measure_interpolation""measure_interpolation""measure_interpolation", 'measure_length1'"measure_length1""measure_length1""measure_length1""measure_length1""measure_length1", 'measure_length2'"measure_length2""measure_length2""measure_length2""measure_length2""measure_length2", 'measure_select'"measure_select""measure_select""measure_select""measure_select""measure_select", 'measure_sigma'"measure_sigma""measure_sigma""measure_sigma""measure_sigma""measure_sigma", 'measure_threshold'"measure_threshold""measure_threshold""measure_threshold""measure_threshold""measure_threshold", 'measure_transition'"measure_transition""measure_transition""measure_transition""measure_transition""measure_transition", 'min_score'"min_score""min_score""min_score""min_score""min_score", 'num_instances'"num_instances""num_instances""num_instances""num_instances""num_instances", 'num_measures'"num_measures""num_measures""num_measures""num_measures""num_measures", 'rand_seed'"rand_seed""rand_seed""rand_seed""rand_seed""rand_seed", 'world_pose'"world_pose""world_pose""world_pose""world_pose""world_pose"

GenParamValueGenParamValueGenParamValueGenParamValueGenParamValuegenParamValue (input_control)  attribute.value(-array) HTupleHTupleHTupleVARIANTHtuple (string / real / integer) (string / double / int / long) (HString / double / Hlong) (char* / double / Hlong) (BSTR / double / Hlong) (char* / double / Hlong)

Values of the generic parameters.

Default value: 1

Suggested values: 1, 2, 3, 4, 5, 10, 20, 'all'"all""all""all""all""all", 'true'"true""true""true""true""true", 'false'"false""false""false""false""false", 'first'"first""first""first""first""first", 'last'"last""last""last""last""last", 'positive'"positive""positive""positive""positive""positive", 'negative'"negative""negative""negative""negative""negative", 'uniform'"uniform""uniform""uniform""uniform""uniform", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic"

Result

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

Possible Predecessors

get_metrology_object_paramget_metrology_object_paramGetMetrologyObjectParamget_metrology_object_paramGetMetrologyObjectParamGetMetrologyObjectParam

Possible Successors

apply_metrology_modelapply_metrology_modelApplyMetrologyModelapply_metrology_modelApplyMetrologyModelApplyMetrologyModel, reset_metrology_object_paramreset_metrology_object_paramResetMetrologyObjectParamreset_metrology_object_paramResetMetrologyObjectParamResetMetrologyObjectParam, get_metrology_object_paramget_metrology_object_paramGetMetrologyObjectParamget_metrology_object_paramGetMetrologyObjectParamGetMetrologyObjectParam

See also

set_metrology_object_fuzzy_paramset_metrology_object_fuzzy_paramSetMetrologyObjectFuzzyParamset_metrology_object_fuzzy_paramSetMetrologyObjectFuzzyParamSetMetrologyObjectFuzzyParam

Module

2D Metrology


ClassesClassesClassesClasses | | | | Operators