gen_measure_arcT_gen_measure_arcGenMeasureArcGenMeasureArcgen_measure_arc (算子)
名称
gen_measure_arcT_gen_measure_arcGenMeasureArcGenMeasureArcgen_measure_arc — 准备提取垂直于环形弧的直边。
签名
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)
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)
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)
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)
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(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)
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
描述
gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcGenMeasureArcgen_measure_arc 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 CenterRowCenterRowCenterRowCenterRowcenterRowcenter_row and
CenterColCenterColCenterColCenterColcenterColcenter_col, its radius in RadiusRadiusRadiusRadiusradiusradius, the starting
angle in AngleStartAngleStartAngleStartAngleStartangleStartangle_start, and its angular extent relative to the
starting angle in AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent. If AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent >
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 AnnulusRadiusAnnulusRadiusAnnulusRadiusAnnulusRadiusannulusRadiusannulus_radius。
For an explanation of the concept of 1D measuring see the introduction of
chapter 一维测量。
The edge extraction algorithm is described in the documentation of
the operator measure_posmeasure_posMeasurePosMeasurePosMeasurePosmeasure_pos。As discussed there, different
types of interpolation can be used for the calculation of the
one-dimensional gray value profile. For InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation =
'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""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 InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation =
'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", bilinear interpolation is used, while for
InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation = 'bicubic'"bicubic""bicubic""bicubic""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_arcgen_measure_arcGenMeasureArcGenMeasureArcGenMeasureArcgen_measure_arc. For this, an optimized data structure, a so-called
measure object, is constructed and returned in MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandlemeasure_handle. The
size of the images in which measurements will be performed must be specified
in the parameters WidthWidthWidthWidthwidthwidth and HeightHeightHeightHeightheightheight。
The system parameter 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" (see set_systemset_systemSetSystemSetSystemSetSystemset_system)
affects the accuracy and speed of the calculations used to construct
the measure object. If 'int_zooming'"int_zooming""int_zooming""int_zooming""int_zooming""int_zooming" is set to
'true'"true""true""true""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""int_zooming""int_zooming""int_zooming""int_zooming" is set to 'false'"false""false""false""false""false", the internal
calculations are performed using floating point arithmetic, leading
to the maximum geometric accuracy, but also to significantly
increased execution times.
注意
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.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:全局(可从任何线程调用)。
- 未采用并行化处理。
此算子返回一个句柄。请注意,即使该句柄被用作特定算子的输入参数,这些算子仍可能改变此句柄类型的实例状态。
参数
CenterRowCenterRowCenterRowCenterRowcenterRowcenter_row (输入控制) point.y → HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the center of the arc.
默认值:
100.0
建议值:
10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
值范围:
0.0
≤
CenterRow
CenterRow
CenterRow
CenterRow
centerRow
center_row
(lin)
最小增量:
1.0
建议增量:
10.0
CenterColCenterColCenterColCenterColcenterColcenter_col (输入控制) point.x → HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the center of the arc.
默认值:
100.0
建议值:
10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
值范围:
0.0
≤
CenterCol
CenterCol
CenterCol
CenterCol
centerCol
center_col
(lin)
最小增量:
1.0
建议增量:
10.0
RadiusRadiusRadiusRadiusradiusradius (输入控制) number → HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Radius of the arc.
默认值:
50.0
建议值:
10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
值范围:
Radius
Radius
Radius
Radius
radius
radius
(lin)
最小增量:
1.0
建议增量:
10.0
限制:
AnnulusRadius <= Radius
AngleStartAngleStartAngleStartAngleStartangleStartangle_start (输入控制) angle.rad → HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Start angle of the arc in radians.
默认值:
0.0
建议值:
-3.14159, -2.35619, -1.57080, -0.78540, 0.0, 0.78540, 1.57080, 2.35619, 3.14159
值范围:
-3.14159
≤
AngleStart
AngleStart
AngleStart
AngleStart
angleStart
angle_start
≤
3.14159 (lin)
最小增量:
0.03142
建议增量:
0.31416
AngleExtentAngleExtentAngleExtentAngleExtentangleExtentangle_extent (输入控制) angle.rad → HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Angular extent of the arc in radians.
默认值:
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
值范围:
-6.28318
≤
AngleExtent
AngleExtent
AngleExtent
AngleExtent
angleExtent
angle_extent
≤
6.28318 (lin)
最小增量:
0.03142
建议增量:
0.31416
AnnulusRadiusAnnulusRadiusAnnulusRadiusAnnulusRadiusannulusRadiusannulus_radius (输入控制) number → HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Radius (half width) of the annulus.
默认值:
10.0
建议值:
10.0, 20.0, 50.0, 100.0, 200.0, 300.0, 400.0, 500.0
值范围:
AnnulusRadius
AnnulusRadius
AnnulusRadius
AnnulusRadius
annulusRadius
annulus_radius
(lin)
最小增量:
1.0
建议增量:
10.0
限制:
AnnulusRadius > 0
WidthWidthWidthWidthwidthwidth (输入控制) extent.x → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Width of the image to be processed subsequently.
默认值:
512
建议值:
128, 160, 192, 256, 320, 384, 512, 640, 768
值范围:
0
≤
Width
Width
Width
Width
width
width
(lin)
最小增量:
1
建议增量:
16
HeightHeightHeightHeightheightheight (输入控制) extent.y → HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Height of the image to be processed subsequently.
默认值:
512
建议值:
120, 128, 144, 240, 256, 288, 480, 512, 576
值范围:
0
≤
Height
Height
Height
Height
height
height
(lin)
最小增量:
1
建议增量:
16
InterpolationInterpolationInterpolationInterpolationinterpolationinterpolation (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Type of interpolation to be used.
默认值:
'nearest_neighbor'
"nearest_neighbor"
"nearest_neighbor"
"nearest_neighbor"
"nearest_neighbor"
"nearest_neighbor"
值列表:
'bicubic'"bicubic""bicubic""bicubic""bicubic""bicubic", 'bilinear'"bilinear""bilinear""bilinear""bilinear""bilinear", 'nearest_neighbor'"nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor""nearest_neighbor"
MeasureHandleMeasureHandleMeasureHandleMeasureHandlemeasureHandlemeasure_handle (输出控制) measure → HMeasure, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Measure object handle.
结果
如果参数值正确,算子
gen_measure_arcgen_measure_arcGenMeasureArcGenMeasureArcGenMeasureArcgen_measure_arc 返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
draw_circledraw_circleDrawCircleDrawCircleDrawCircledraw_circle
可能的后继
measure_posmeasure_posMeasurePosMeasurePosMeasurePosmeasure_pos,
measure_pairsmeasure_pairsMeasurePairsMeasurePairsMeasurePairsmeasure_pairs,
fuzzy_measure_posfuzzy_measure_posFuzzyMeasurePosFuzzyMeasurePosFuzzyMeasurePosfuzzy_measure_pos,
fuzzy_measure_pairsfuzzy_measure_pairsFuzzyMeasurePairsFuzzyMeasurePairsFuzzyMeasurePairsfuzzy_measure_pairs,
fuzzy_measure_pairingfuzzy_measure_pairingFuzzyMeasurePairingFuzzyMeasurePairingFuzzyMeasurePairingfuzzy_measure_pairing
替代
edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix
另见
gen_measure_rectangle2gen_measure_rectangle2GenMeasureRectangle2GenMeasureRectangle2GenMeasureRectangle2gen_measure_rectangle2
模块
一维计量