add_metrology_object_ellipse_measure T_add_metrology_object_ellipse_measure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure add_metrology_object_ellipse_measure (算子)
名称
add_metrology_object_ellipse_measure T_add_metrology_object_ellipse_measure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure add_metrology_object_ellipse_measure — 将椭圆或椭圆弧添加到计量模型中。
签名
add_metrology_object_ellipse_measure ( : : MetrologyHandle , Row , Column , Phi , Radius1 , Radius2 , MeasureLength1 , MeasureLength2 , MeasureSigma , MeasureThreshold , GenParamName , GenParamValue : Index )
Herror T_add_metrology_object_ellipse_measure (const Htuple MetrologyHandle , const Htuple Row , const Htuple Column , const Htuple Phi , const Htuple Radius1 , const Htuple Radius2 , const Htuple MeasureLength1 , const Htuple MeasureLength2 , const Htuple MeasureSigma , const Htuple MeasureThreshold , const Htuple GenParamName , const Htuple GenParamValue , Htuple* Index )
void AddMetrologyObjectEllipseMeasure (const HTuple& MetrologyHandle , const HTuple& Row , const HTuple& Column , const HTuple& Phi , const HTuple& Radius1 , const HTuple& Radius2 , const HTuple& MeasureLength1 , const HTuple& MeasureLength2 , const HTuple& MeasureSigma , const HTuple& MeasureThreshold , const HTuple& GenParamName , const HTuple& GenParamValue , HTuple* Index )
Hlong HMetrologyModel ::AddMetrologyObjectEllipseMeasure (const HTuple& Row , const HTuple& Column , const HTuple& Phi , const HTuple& Radius1 , const HTuple& Radius2 , const HTuple& MeasureLength1 , const HTuple& MeasureLength2 , const HTuple& MeasureSigma , const HTuple& MeasureThreshold , const HTuple& GenParamName , const HTuple& GenParamValue ) const
Hlong HMetrologyModel ::AddMetrologyObjectEllipseMeasure (double Row , double Column , double Phi , double Radius1 , double Radius2 , double MeasureLength1 , double MeasureLength2 , double MeasureSigma , double MeasureThreshold , const HTuple& GenParamName , const HTuple& GenParamValue ) const
static void HOperatorSet .AddMetrologyObjectEllipseMeasure (HTuple metrologyHandle , HTuple row , HTuple column , HTuple phi , HTuple radius1 , HTuple radius2 , HTuple measureLength1 , HTuple measureLength2 , HTuple measureSigma , HTuple measureThreshold , HTuple genParamName , HTuple genParamValue , out HTuple index )
int HMetrologyModel .AddMetrologyObjectEllipseMeasure (HTuple row , HTuple column , HTuple phi , HTuple radius1 , HTuple radius2 , HTuple measureLength1 , HTuple measureLength2 , HTuple measureSigma , HTuple measureThreshold , HTuple genParamName , HTuple genParamValue )
int HMetrologyModel .AddMetrologyObjectEllipseMeasure (double row , double column , double phi , double radius1 , double radius2 , double measureLength1 , double measureLength2 , double measureSigma , double measureThreshold , HTuple genParamName , HTuple genParamValue )
def add_metrology_object_ellipse_measure (metrology_handle : HHandle, row : MaybeSequence[Union[int, float]], column : MaybeSequence[Union[int, float]], phi : MaybeSequence[Union[int, float]], radius_1 : MaybeSequence[Union[int, float]], radius_2 : 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
描述
add_metrology_object_ellipse_measure add_metrology_object_ellipse_measure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure add_metrology_object_ellipse_measure adds a metrology object
of type ellipse or elliptic arc to a metrology model and prepares the
rectangular measure regions. The handle of the model is passed in
MetrologyHandle MetrologyHandle MetrologyHandle MetrologyHandle metrologyHandle metrology_handle .
For an explanation of the concept of 2D metrology see the
introduction of chapter 二维计量 .
The geometric shape of the metrology object of type ellipse is specified
by its center (Row Row Row Row row row , Column Column Column Column column column ), the orientation of the
main axis Phi Phi Phi Phi phi phi , the length of the larger half axis
Radius1 Radius1 Radius1 Radius1 radius1 radius_1 , and the length of the smaller half axis
Radius2 Radius2 Radius2 Radius2 radius2 radius_2 . The input value for Phi Phi Phi Phi phi phi is mapped
automatically to the interval
.
The rectangular measure regions lie perpendicular to the
boundary of the ellipse. The half edge lengths of the measure
regions perpendicular and tangential to the boundary of the ellipse
are set in MeasureLength1 MeasureLength1 MeasureLength1 MeasureLength1 measureLength1 measure_length_1 and MeasureLength2 MeasureLength2 MeasureLength2 MeasureLength2 measureLength2 measure_length_2 .
The centers of the measure regions lie on the boundary of the
geometric shape. The parameter MeasureSigma MeasureSigma MeasureSigma MeasureSigma measureSigma measure_sigma specifies the
standard deviation that is used by the operator
apply_metrology_model apply_metrology_model ApplyMetrologyModel ApplyMetrologyModel ApplyMetrologyModel apply_metrology_model to smooth the gray values of the image.
Salient edges can be selected with the parameter MeasureThreshold MeasureThreshold MeasureThreshold MeasureThreshold measureThreshold measure_threshold ,
which constitutes a threshold on the amplitude, i.e., the absolute
value of the first derivative of the edge. The operator
add_metrology_object_ellipse_measure add_metrology_object_ellipse_measure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure add_metrology_object_ellipse_measure returns the index of the
added metrology object in the parameter Index Index Index Index index index .
Furthermore, you can adjust some generic parameters within
GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name and GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value . The following
values for GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name and GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value are
available:
'start_phi' "start_phi" "start_phi" "start_phi" "start_phi" "start_phi" :
The parameter specifies the angle at
the start point of an elliptic arc. The angle at the start point
is measured relative to the positive main axis specified with
Phi Phi Phi Phi phi phi and corresponds to the smallest surrounding circle
of the ellipse. The actual start point of the ellipse is the
intersection of the ellipse with the orthogonal projection of the
corresponding circle point onto the main axis. The angle refers
to the coordinate system of the ellipse, i.e., it is specified
relative to the main axis and in a mathematical positive
direction. Thus, the two main poles correspond to the
angles 0 and
, the two minor poles to the
angle
and
. To create a
closed ellipse the value of the parameter 'start_phi' "start_phi" "start_phi" "start_phi" "start_phi" "start_phi"
is set to 0 and the value of the parameter
'end_phi' "end_phi" "end_phi" "end_phi" "end_phi" "end_phi" is set to
(with positive
point order). The input value is mapped internally
automatically to the interval
.
List of values: 0.0 , 0.78 ,
6.28318
Default value: 0.0
'end_phi' "end_phi" "end_phi" "end_phi" "end_phi" "end_phi" :
The parameter specifies the angle at
the end point of an elliptic arc. The angle at the end point are
measured relative to the positive main axis specified with
Phi Phi Phi Phi phi phi and corresponds to the smallest surrounding circle
of the ellipse. The actual end point of the ellipse is the
intersection of the ellipse with the orthogonal projection of the
corresponding circle point onto the main axis. The angle refers
to the coordinate system of the ellipse, i.e., it is specified
relative to the main axis and in a mathematical positive direction.
Thus, the two main poles correspond to the
angles 0 and
, the two minor poles to the
angle
and
. To create a
closed ellipse the value of the parameter 'start_phi' "start_phi" "start_phi" "start_phi" "start_phi" "start_phi" is
set to 0 and the value of the parameter 'end_phi' "end_phi" "end_phi" "end_phi" "end_phi" "end_phi"
is set to
(with positive point order).
The input value is mapped automatically
to the interval
.
List of values: 0.0 , 0.78 ,
6.28318
Default value: 6.28318
'point_order' "point_order" "point_order" "point_order" "point_order" "point_order" :
The parameter specifies the direction
of the elliptic arc. For the value 'positive' "positive" "positive" "positive" "positive" "positive" , the elliptic
arc is defined between 'start_phi' "start_phi" "start_phi" "start_phi" "start_phi" "start_phi" and 'end_phi' "end_phi" "end_phi" "end_phi" "end_phi" "end_phi"
in mathematically positive direction (counterclockwise).
For the value 'negative' "negative" "negative" "negative" "negative" "negative" , the elliptic arc is defined
between 'start_phi' "start_phi" "start_phi" "start_phi" "start_phi" "start_phi" and 'end_phi' "end_phi" "end_phi" "end_phi" "end_phi" "end_phi" in
mathematically negative direction (clockwise).
List of values: 'positive' "positive" "positive" "positive" "positive" "positive" , 'negative' "negative" "negative" "negative" "negative" "negative"
Default value: 'positive' "positive" "positive" "positive" "positive" "positive"
Additionally, all generic parameters that are available for the
operator set_metrology_object_param set_metrology_object_param SetMetrologyObjectParam SetMetrologyObjectParam SetMetrologyObjectParam set_metrology_object_param can be set. But note
that for a lot of applications the default values are sufficient
and no adjustment is necessary.
执行信息
多线程类型:可重入(与非独占算子并行运行)。
多线程作用域:全局(可从任何线程调用)。
未采用并行化处理。
此算子修改后续输入参数的状态:
在执行此算子时,若该参数值需在多个线程间使用,则必须对其访问进行同步。
参数
MetrologyHandle MetrologyHandle MetrologyHandle MetrologyHandle metrologyHandle metrology_handle (输入控制,状态被修改) metrology_model → HMetrologyModel , HTuple HHandle HTuple Htuple (handle) (IntPtr ) (HHandle ) (handle )
计量模型的句柄。
Row Row Row Row row row (输入控制) ellipse.center.y(-array) → HTuple MaybeSequence[Union[int, float]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row (or Y) coordinate of the center of the ellipse.
Column Column Column Column column column (输入控制) ellipse.center.x(-array) → HTuple MaybeSequence[Union[int, float]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column (or X) coordinate of the center of the ellipse.
Phi Phi Phi Phi phi phi (输入控制) ellipse.angle.rad(-array) → HTuple MaybeSequence[Union[int, float]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Orientation of the main axis [rad].
Radius1 Radius1 Radius1 Radius1 radius1 radius_1 (输入控制) ellipse.radius1(-array) → HTuple MaybeSequence[Union[int, float]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Length of the larger half axis.
Radius2 Radius2 Radius2 Radius2 radius2 radius_2 (输入控制) ellipse.radius2(-array) → HTuple MaybeSequence[Union[int, float]] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Length of the smaller half axis.
MeasureLength1 MeasureLength1 MeasureLength1 MeasureLength1 measureLength1 measure_length_1 (输入控制) number → HTuple Union[int, float] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
与边界垂直的测量区域长度的一半。
默认值:
20.0
建议值:
10.0, 20.0, 30.0
值范围:
1.0
≤
MeasureLength1
MeasureLength1
MeasureLength1
MeasureLength1
measureLength1
measure_length_1
最小增量:
1.0
建议增量:
10.0
限制:
MeasureLength1 < Radius1 && MeasureLength1 < Radius2
MeasureLength2 MeasureLength2 MeasureLength2 MeasureLength2 measureLength2 measure_length_2 (输入控制) number → HTuple Union[int, float] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
与边界相切的测量区域长度的一半。
默认值:
5.0
建议值:
3.0, 5.0, 10.0
值范围:
1.0
≤
MeasureLength2
MeasureLength2
MeasureLength2
MeasureLength2
measureLength2
measure_length_2
最小增量:
1.0
建议增量:
10.0
MeasureSigma MeasureSigma MeasureSigma MeasureSigma measureSigma measure_sigma (输入控制) number → HTuple Union[int, float] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
高斯函数的平滑西格玛(sigma)值。
默认值:
1.0
建议值:
0.4, 0.6, 0.8, 1.0, 1.5, 2.0, 3.0, 4.0, 5.0, 7.0, 10.0
值范围:
0.4
≤
MeasureSigma
MeasureSigma
MeasureSigma
MeasureSigma
measureSigma
measure_sigma
≤
100.0
最小增量:
0.01
建议增量:
0.1
MeasureThreshold MeasureThreshold MeasureThreshold MeasureThreshold measureThreshold measure_threshold (输入控制) number → HTuple Union[int, float] HTuple Htuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Minimum edge amplitude.
默认值:
30.0
建议值:
5.0, 10.0, 20.0, 30.0, 40.0, 50.0, 60.0, 70.0, 90.0, 110.0
值范围:
1
≤
MeasureThreshold
MeasureThreshold
MeasureThreshold
MeasureThreshold
measureThreshold
measure_threshold
≤
255 (lin)
最小增量:
0.5
建议增量:
2
GenParamName GenParamName GenParamName GenParamName genParamName gen_param_name (输入控制) attribute.name-array → HTuple Sequence[str] HTuple Htuple (string) (string ) (HString ) (char* )
Names of the generic parameters.
默认值:
[]
值列表:
'distance_threshold' "distance_threshold" "distance_threshold" "distance_threshold" "distance_threshold" "distance_threshold" , 'end_phi' "end_phi" "end_phi" "end_phi" "end_phi" "end_phi" , '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_select' "measure_select" "measure_select" "measure_select" "measure_select" "measure_select" , '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" , 'point_order' "point_order" "point_order" "point_order" "point_order" "point_order" , 'rand_seed' "rand_seed" "rand_seed" "rand_seed" "rand_seed" "rand_seed" , 'start_phi' "start_phi" "start_phi" "start_phi" "start_phi" "start_phi"
GenParamValue GenParamValue GenParamValue GenParamValue genParamValue gen_param_value (输入控制) attribute.value-array → HTuple Sequence[Union[float, int, str]] HTuple Htuple (real / integer / string) (double / int / long / string) (double / Hlong / HString) (double / Hlong / char*)
Values of the generic parameters.
默认值:
[]
建议值:
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"
Index Index Index Index index index (输出控制) integer → HTuple int HTuple Htuple (integer) (int / long) (Hlong ) (Hlong )
Index of the created metrology object.
结果
如果参数有效,算子
add_metrology_object_ellipse_measure add_metrology_object_ellipse_measure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure AddMetrologyObjectEllipseMeasure add_metrology_object_ellipse_measure 返回值 2 (
H_MSG_TRUE )
。如有必要,则抛出异常。
可能的前趋
set_metrology_model_image_size set_metrology_model_image_size SetMetrologyModelImageSize SetMetrologyModelImageSize SetMetrologyModelImageSize set_metrology_model_image_size
可能的后继
align_metrology_model align_metrology_model AlignMetrologyModel AlignMetrologyModel AlignMetrologyModel align_metrology_model ,
apply_metrology_model apply_metrology_model ApplyMetrologyModel ApplyMetrologyModel ApplyMetrologyModel apply_metrology_model
替代
add_metrology_object_generic add_metrology_object_generic AddMetrologyObjectGeneric AddMetrologyObjectGeneric AddMetrologyObjectGeneric add_metrology_object_generic
另见
get_metrology_object_model_contour get_metrology_object_model_contour GetMetrologyObjectModelContour GetMetrologyObjectModelContour GetMetrologyObjectModelContour get_metrology_object_model_contour ,
set_metrology_model_param set_metrology_model_param SetMetrologyModelParam SetMetrologyModelParam SetMetrologyModelParam set_metrology_model_param ,
add_metrology_object_circle_measure add_metrology_object_circle_measure AddMetrologyObjectCircleMeasure AddMetrologyObjectCircleMeasure AddMetrologyObjectCircleMeasure add_metrology_object_circle_measure ,
add_metrology_object_line_measure add_metrology_object_line_measure AddMetrologyObjectLineMeasure AddMetrologyObjectLineMeasure AddMetrologyObjectLineMeasure add_metrology_object_line_measure ,
add_metrology_object_rectangle2_measure add_metrology_object_rectangle2_measure AddMetrologyObjectRectangle2Measure AddMetrologyObjectRectangle2Measure AddMetrologyObjectRectangle2Measure add_metrology_object_rectangle2_measure
模块
二维计量