Skip to content

gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcgen_measure_arcT_gen_measure_arc🔗

Short description🔗

gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcgen_measure_arcT_gen_measure_arc — Prepare the extraction of straight edges perpendicular to an annular arc.

Signature🔗

gen_measure_arc( point.y CenterRow, point.x CenterCol, number Radius, angle.rad AngleStart, angle.rad AngleExtent, number AnnulusRadius, extent.x Width, extent.y Height, string Interpolation, out measure MeasureHandle )gen_measure_arc( : : CenterRow, CenterCol, Radius, AngleStart, AngleExtent, AnnulusRadius, Width, Height, Interpolation : MeasureHandle )void GenMeasureArc( const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Radius, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AnnulusRadius, const HTuple& Width, const HTuple& Height, const HTuple& Interpolation, HTuple* MeasureHandle )static void HOperatorSet.GenMeasureArc( HTuple centerRow, HTuple centerCol, HTuple radius, HTuple angleStart, HTuple angleExtent, HTuple annulusRadius, HTuple width, HTuple height, HTuple interpolation, out HTuple measureHandle )def gen_measure_arc( center_row: Union[int, float], center_col: Union[int, float], radius: Union[int, float], angle_start: Union[int, float], angle_extent: Union[int, float], annulus_radius: Union[int, float], width: int, height: int, interpolation: str ) -> HHandle

Herror T_gen_measure_arc( const Htuple CenterRow, const Htuple CenterCol, const Htuple Radius, const Htuple AngleStart, const Htuple AngleExtent, const Htuple AnnulusRadius, const Htuple Width, const Htuple Height, const Htuple Interpolation, Htuple* MeasureHandle )

void HMeasure::HMeasure( const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Radius, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation )

void HMeasure::HMeasure( double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation )

void HMeasure::HMeasure( double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const char* Interpolation )

void HMeasure::HMeasure( double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const wchar_t* Interpolation ) (Windows only)

public HMeasure( HTuple centerRow, HTuple centerCol, HTuple radius, HTuple angleStart, HTuple angleExtent, HTuple annulusRadius, int width, int height, string interpolation )

public HMeasure( double centerRow, double centerCol, double radius, double angleStart, double angleExtent, double annulusRadius, int width, int height, string interpolation )

void HMeasure::GenMeasureArc( const HTuple& CenterRow, const HTuple& CenterCol, const HTuple& Radius, const HTuple& AngleStart, const HTuple& AngleExtent, const HTuple& AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation )

void HMeasure::GenMeasureArc( double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const HString& Interpolation )

void HMeasure::GenMeasureArc( double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const char* Interpolation )

void HMeasure::GenMeasureArc( double CenterRow, double CenterCol, double Radius, double AngleStart, double AngleExtent, double AnnulusRadius, Hlong Width, Hlong Height, const wchar_t* Interpolation ) (Windows only)

void HMeasure.GenMeasureArc( HTuple centerRow, HTuple centerCol, HTuple radius, HTuple angleStart, HTuple angleExtent, HTuple annulusRadius, int width, int height, string interpolation )

void HMeasure.GenMeasureArc( double centerRow, double centerCol, double radius, double angleStart, double angleExtent, double annulusRadius, int width, int height, string interpolation )

Description🔗

gen_measure_arcGenMeasureArc prepares the extraction of straight edges which lie perpendicular to an annular arc. Here, annular arc denotes a circular arc with an associated width. The center of the arc is passed in the parameters CenterRowcenterRowcenter_row and CenterColcenterColcenter_col, its radius in Radiusradiusradius, the starting angle in AngleStartangleStartangle_start, and its angular extent relative to the starting angle in AngleExtentangleExtentangle_extent. If \(\textrm{AngleExtent} > 0\), an arc with counterclockwise orientation is generated, otherwise an arc with clockwise orientation. The radius of the annular arc, i.e., half its width, is determined by AnnulusRadiusannulusRadiusannulus_radius.

For an explanation of the concept of 1D measuring see the introduction of chapter 1D Measuring.

The edge extraction algorithm is described in the documentation of the operator measure_posMeasurePos. As discussed there, different types of interpolation can be used for the calculation of the one-dimensional gray value profile. For Interpolationinterpolationinterpolation = 'nearest_neighbor'"nearest_neighbor", the gray values in the measurement are obtained from the gray values of the closest pixel, i.e., by constant interpolation. For Interpolationinterpolationinterpolation = 'bilinear'"bilinear", bilinear interpolation is used, while for Interpolationinterpolationinterpolation = 'bicubic'"bicubic", bicubic interpolation is used.

To perform the actual measurement at optimal speed, all computations that can be used for multiple measurements are already performed in the operator gen_measure_arcGenMeasureArc. For this, an optimized data structure, a so-called measure object, is constructed and returned in MeasureHandlemeasureHandlemeasure_handle. The size of the images in which measurements will be performed must be specified in the parameters Widthwidthwidth and Heightheightheight.

The system parameter 'int_zooming'"int_zooming" (see set_systemSetSystem) affects the accuracy and speed of the calculations used to construct the measure object. If 'int_zooming'"int_zooming" is set to 'true'"true", the internal calculations are performed using fixed point arithmetic, leading to much shorter execution times. However, the geometric accuracy is slightly lower in this mode. If 'int_zooming'"int_zooming" is set to 'false'"false", the internal calculations are performed using floating point arithmetic, leading to the maximum geometric accuracy, but also to significantly increased execution times.

Attention🔗

Note that when using bilinear or bicubic interpolation, not only the measurement rectangle but additionally the margin around the rectangle must fit into the image. The width of the margin (in all four directions) must be at least one pixel for bilinear interpolation and two pixels for bicubic interpolation. For projection lines that do not fulfill this condition, no gray value is computed. Thus, no edge can be extracted at these positions.

Please also note that the center coordinates of the arc are rounded internally, so that the center lies on the pixel grid. This is done to ensure consistency.

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 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🔗

CenterRowcenterRowcenter_row (input_control) point.y → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Row coordinate of the center of the arc.

Default: 100.0100.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Value range: 0.0 ≤ CenterRow (lin)
Minimum increment: 1.0
Recommended increment: 10.0

CenterColcenterColcenter_col (input_control) point.x → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Column coordinate of the center of the arc.

Default: 100.0100.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Value range: 0.0 ≤ CenterCol (lin)
Minimum increment: 1.0
Recommended increment: 10.0

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

Radius of the arc.

Default: 50.050.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Value range: Radius (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: AnnulusRadius <= Radius

AngleStartangleStartangle_start (input_control) angle.rad → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Start angle of the arc in radians.

Default: 0.00.0
Suggested values: -3.14159, -2.35619, -1.57080, -0.78540, 0.0, 0.78540, 1.57080, 2.35619, 3.14159-3.14159, -2.35619, -1.57080, -0.78540, 0.0, 0.78540, 1.57080, 2.35619, 3.14159
Value range: -3.14159 ≤ AngleStart ≤ 3.14159 (lin)
Minimum increment: 0.03142
Recommended increment: 0.31416

AngleExtentangleExtentangle_extent (input_control) angle.rad → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

Angular extent of the arc in radians.

Default: 6.283186.28318
Suggested values: -6.28318, -5.49779, -4.71239, -3.92699, -3.14159, -2.35619, -1.57080, -0.78540, 0.78540, 1.57080, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318-6.28318, -5.49779, -4.71239, -3.92699, -3.14159, -2.35619, -1.57080, -0.78540, 0.78540, 1.57080, 2.35619, 3.14159, 3.92699, 4.71239, 5.49779, 6.28318
Value range: -6.28318 ≤ AngleExtent ≤ 6.28318 (lin)
Minimum increment: 0.03142
Recommended increment: 0.31416

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

Radius (half width) of the annulus.

Default: 10.010.0
Suggested values: 10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.010.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
Value range: AnnulusRadius (lin)
Minimum increment: 1.0
Recommended increment: 10.0
Restriction: AnnulusRadius > 0

Widthwidthwidth (input_control) extent.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Width of the image to be processed subsequently.

Default: 512512
Suggested values: 128, 160, 192, 256, 320, 384, 512, 640, 768128, 160, 192, 256, 320, 384, 512, 640, 768
Value range: 0 ≤ Width (lin)
Minimum increment: 1
Recommended increment: 16

Heightheightheight (input_control) extent.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Height of the image to be processed subsequently.

Default: 512512
Suggested values: 120, 128, 144, 240, 256, 288, 480, 512, 576120, 128, 144, 240, 256, 288, 480, 512, 576
Value range: 0 ≤ Height (lin)
Minimum increment: 1
Recommended increment: 16

Interpolationinterpolationinterpolation (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Type of interpolation to be used.

Default: 'nearest_neighbor'"nearest_neighbor"
List of values: 'bicubic', 'bilinear', 'nearest_neighbor'"bicubic", "bilinear", "nearest_neighbor"

MeasureHandlemeasureHandlemeasure_handle (output_control) measure → (handle)(handle)HTuple (HHandle)HMeasure, HTuple (IntPtr)HHandleHtuple (handle)

Measure object handle.

Result🔗

If the parameter values are correct, the operator gen_measure_arcGenMeasureArc returns the value 2 (H_MSG_TRUE). Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

draw_circleDrawCircle

Possible successors

measure_posMeasurePos, measure_pairsMeasurePairs, fuzzy_measure_posFuzzyMeasurePos, fuzzy_measure_pairsFuzzyMeasurePairs, fuzzy_measure_pairingFuzzyMeasurePairing

Alternatives

edges_sub_pixEdgesSubPix

See also

gen_measure_rectangle2GenMeasureRectangle2

Module🔗

1D Metrology