Skip to content

add_metrology_object_line_measureadd_metrology_object_line_measureAddMetrologyObjectLineMeasureAddMetrologyObjectLineMeasureadd_metrology_object_line_measureT_add_metrology_object_line_measure🔗

Short description🔗

add_metrology_object_line_measureadd_metrology_object_line_measureAddMetrologyObjectLineMeasureAddMetrologyObjectLineMeasureadd_metrology_object_line_measureT_add_metrology_object_line_measure — Add a line to a metrology model.

Signature🔗

add_metrology_object_line_measure( metrology_model MetrologyHandle, line.begin.y RowBegin, line.begin.x ColumnBegin, line.end.y RowEnd, line.end.x ColumnEnd, number MeasureLength1, number MeasureLength2, number MeasureSigma, number MeasureThreshold, attribute.name GenParamName, attribute.value GenParamValue, out integer Index )add_metrology_object_line_measure( : : MetrologyHandle, RowBegin, ColumnBegin, RowEnd, ColumnEnd, MeasureLength1, MeasureLength2, MeasureSigma, MeasureThreshold, GenParamName, GenParamValue : Index )void AddMetrologyObjectLineMeasure( const HTuple& MetrologyHandle, const HTuple& RowBegin, const HTuple& ColumnBegin, const HTuple& RowEnd, const HTuple& ColumnEnd, const HTuple& MeasureLength1, const HTuple& MeasureLength2, const HTuple& MeasureSigma, const HTuple& MeasureThreshold, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Index )static void HOperatorSet.AddMetrologyObjectLineMeasure( HTuple metrologyHandle, HTuple rowBegin, HTuple columnBegin, HTuple rowEnd, HTuple columnEnd, HTuple measureLength1, HTuple measureLength2, HTuple measureSigma, HTuple measureThreshold, HTuple genParamName, HTuple genParamValue, out HTuple index )def add_metrology_object_line_measure( metrology_handle: HHandle, row_begin: MaybeSequence[Union[int, float]], column_begin: MaybeSequence[Union[int, float]], row_end: MaybeSequence[Union[int, float]], column_end: MaybeSequence[Union[int, float]], measure_length_1: Union[int, float], measure_length_2: Union[int, float], measure_sigma: Union[int, float], measure_threshold: Union[int, float], gen_param_name: Sequence[str], gen_param_value: Sequence[Union[float, int, str]] ) -> int

Herror T_add_metrology_object_line_measure( const Htuple MetrologyHandle, const Htuple RowBegin, const Htuple ColumnBegin, const Htuple RowEnd, const Htuple ColumnEnd, const Htuple MeasureLength1, const Htuple MeasureLength2, const Htuple MeasureSigma, const Htuple MeasureThreshold, const Htuple GenParamName, const Htuple GenParamValue, Htuple* Index )

Hlong HMetrologyModel::AddMetrologyObjectLineMeasure( const HTuple& RowBegin, const HTuple& ColumnBegin, const HTuple& RowEnd, const HTuple& ColumnEnd, const HTuple& MeasureLength1, const HTuple& MeasureLength2, const HTuple& MeasureSigma, const HTuple& MeasureThreshold, const HTuple& GenParamName, const HTuple& GenParamValue ) const

Hlong HMetrologyModel::AddMetrologyObjectLineMeasure( double RowBegin, double ColumnBegin, double RowEnd, double ColumnEnd, double MeasureLength1, double MeasureLength2, double MeasureSigma, double MeasureThreshold, const HTuple& GenParamName, const HTuple& GenParamValue ) const

int HMetrologyModel.AddMetrologyObjectLineMeasure( HTuple rowBegin, HTuple columnBegin, HTuple rowEnd, HTuple columnEnd, HTuple measureLength1, HTuple measureLength2, HTuple measureSigma, HTuple measureThreshold, HTuple genParamName, HTuple genParamValue )

int HMetrologyModel.AddMetrologyObjectLineMeasure( double rowBegin, double columnBegin, double rowEnd, double columnEnd, double measureLength1, double measureLength2, double measureSigma, double measureThreshold, HTuple genParamName, HTuple genParamValue )

Description🔗

add_metrology_object_line_measureAddMetrologyObjectLineMeasure adds a metrology object of type line to a metrology model and prepares the rectangular measure regions. The handle of the model is passed in MetrologyHandlemetrologyHandlemetrology_handle.

For an explanation of the concept of 2D metrology see the introduction of chapter 2D Metrology.

The geometric shape of the metrology object of type line is described by the coordinates of the start point (RowBeginrowBeginrow_begin, ColumnBegincolumnBegincolumn_begin) and the coordinates of the end point (RowEndrowEndrow_end, ColumnEndcolumnEndcolumn_end). The rectangular measure regions lie perpendicular to the line. The half edge lengths of the measure regions perpendicular and tangential to the line are set in MeasureLength1measureLength1measure_length_1 and MeasureLength2measureLength2measure_length_2. The centers of the measure regions lie on the line. The parameter MeasureSigmameasureSigmameasure_sigma specifies a standard deviation that is used by the operator apply_metrology_modelApplyMetrologyModel to smooth the gray values of the image. Salient edges can be selected with the parameter MeasureThresholdmeasureThresholdmeasure_threshold, which constitutes a threshold on the amplitude, i.e., the absolute value of the first derivative of the edge.

Furthermore, you can adjust some generic parameters within GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value. In particular, all generic parameters that are available in the operator set_metrology_object_paramSetMetrologyObjectParam can be set. But note that for a lot of applications the default values are sufficient and no adjustment is necessary.

The operator add_metrology_object_line_measureAddMetrologyObjectLineMeasure returns the index of the added metrology object in the parameter Indexindexindex.

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.

This operator modifies the state of the following input parameter:

During execution of this operator, access to the value of this parameter must be synchronized if it is used across multiple threads.

Parameters🔗

MetrologyHandlemetrologyHandlemetrology_handle (input_control, state is modified) metrology_model → (handle)(handle)HTuple (HHandle)HMetrologyModel, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the metrology model.

RowBeginrowBeginrow_begin (input_control) line.begin.y(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Row (or Y) coordinate of the start of the line.

ColumnBegincolumnBegincolumn_begin (input_control) line.begin.x(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Column (or X) coordinate of the start of the line.

RowEndrowEndrow_end (input_control) line.end.y(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Row (or Y) coordinate of the end of the line.

ColumnEndcolumnEndcolumn_end (input_control) line.end.x(-array) → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[int, float]]Htuple (double / Hlong)

Column (or X) coordinate of the end of the line.

MeasureLength1measureLength1measure_length_1 (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Half length of the measure regions perpendicular to the boundary.

Default: 20.020.0
Suggested values: 10.0, 20.0, 30.010.0, 20.0, 30.0
Value range: 1.0 ≤ MeasureLength1
Minimum increment: 1.0
Recommended increment: 10.0

MeasureLength2measureLength2measure_length_2 (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Half length of the measure regions tangential to the boundary.

Default: 5.05.0
Suggested values: 3.0, 5.0, 10.03.0, 5.0, 10.0
Value range: 1.0 ≤ MeasureLength2
Minimum increment: 1.0
Recommended increment: 10.0

MeasureSigmameasureSigmameasure_sigma (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Sigma of the Gaussian function for the smoothing.

Default: 1.01.0
Suggested values: 0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.00.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
Value range: 0.4 ≤ MeasureSigma ≤ 100.0
Minimum increment: 0.01
Recommended increment: 0.1

MeasureThresholdmeasureThresholdmeasure_threshold (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Minimum edge amplitude.

Default: 30.030.0
Suggested values: 5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.05.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.0
Value range: 1 ≤ MeasureThreshold ≤ 255 (lin)
Minimum increment: 0.5
Recommended increment: 2

GenParamNamegenParamNamegen_param_name (input_control) attribute.name-array → (string)(string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Names of the generic parameters.

Default: [][]
List of values: 'distance_threshold', 'instances_outside_measure_regions', 'max_num_iterations', 'measure_distance', 'measure_interpolation', 'measure_select', 'measure_transition', 'min_score', 'num_instances', 'num_measures', 'rand_seed'"distance_threshold", "instances_outside_measure_regions", "max_num_iterations", "measure_distance", "measure_interpolation", "measure_select", "measure_transition", "min_score", "num_instances", "num_measures", "rand_seed"

GenParamValuegenParamValuegen_param_value (input_control) attribute.value-array → (real / integer / string)(real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)Sequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Values of the generic parameters.

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

Indexindexindex (output_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Index of the created metrology object.

Result🔗

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

Combinations with other operators🔗

Combinations

Possible predecessors

set_metrology_model_image_sizeSetMetrologyModelImageSize

Possible successors

align_metrology_modelAlignMetrologyModel, apply_metrology_modelApplyMetrologyModel

Alternatives

add_metrology_object_genericAddMetrologyObjectGeneric

See also

get_metrology_object_model_contourGetMetrologyObjectModelContour, set_metrology_model_paramSetMetrologyModelParam, add_metrology_object_circle_measureAddMetrologyObjectCircleMeasure, add_metrology_object_ellipse_measureAddMetrologyObjectEllipseMeasure, add_metrology_object_rectangle2_measureAddMetrologyObjectRectangle2Measure

Module🔗

2D Metrology