dist_ellipse_contour_points_xldT_dist_ellipse_contour_points_xldDistEllipseContourPointsXldDistEllipseContourPointsXlddist_ellipse_contour_points_xld (算子)

名称

dist_ellipse_contour_points_xldT_dist_ellipse_contour_points_xldDistEllipseContourPointsXldDistEllipseContourPointsXlddist_ellipse_contour_points_xld — 计算所有轮廓点到椭圆的距离。

签名

dist_ellipse_contour_points_xld(Contour : : DistanceMode, ClippingEndPoints, Row, Column, Phi, Radius1, Radius2 : Distances)

Herror T_dist_ellipse_contour_points_xld(const Hobject Contour, const Htuple DistanceMode, const Htuple ClippingEndPoints, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, Htuple* Distances)

void DistEllipseContourPointsXld(const HObject& Contour, const HTuple& DistanceMode, const HTuple& ClippingEndPoints, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, HTuple* Distances)

HTuple HXLDCont::DistEllipseContourPointsXld(const HString& DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2) const

HTuple HXLDCont::DistEllipseContourPointsXld(const char* DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2) const

HTuple HXLDCont::DistEllipseContourPointsXld(const wchar_t* DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2) const   ( Windows only)

static void HOperatorSet.DistEllipseContourPointsXld(HObject contour, HTuple distanceMode, HTuple clippingEndPoints, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, out HTuple distances)

HTuple HXLDCont.DistEllipseContourPointsXld(string distanceMode, int clippingEndPoints, double row, double column, double phi, double radius1, double radius2)

def dist_ellipse_contour_points_xld(contour: HObject, distance_mode: str, clipping_end_points: int, row: float, column: float, phi: float, radius_1: float, radius_2: float) -> Sequence[float]

描述

算子 dist_ellipse_contour_points_xlddist_ellipse_contour_points_xldDistEllipseContourPointsXldDistEllipseContourPointsXldDistEllipseContourPointsXlddist_ellipse_contour_points_xld determines the distances between points of a contour ContourContourContourContourcontourcontour and an ellipse specified by the center (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn), the orientation of the main axis PhiPhiPhiPhiphiphi, the length of the larger half axis Radius1Radius1Radius1Radius1radius1radius_1, and the length of the smaller half axis Radius2Radius2Radius2Radius2radius2radius_2

The distance measure is the geometric distance, sometimes also called orthogonal distance. The distances DistancesDistancesDistancesDistancesdistancesdistances are returned for all points of the contour. Normally, the distance is a positive value. In this case DistanceModeDistanceModeDistanceModeDistanceModedistanceModedistance_mode equal to 'unsigned'"unsigned""unsigned""unsigned""unsigned""unsigned" must be chosen. If this option is switched to 'signed'"signed""signed""signed""signed""signed" the distances can take positive or negative sign, depending on whether the contour points lie outside or inside the ellipse respectively.

Because of artifacts in the preprocessing, the start and end points of a contour might be faulty. In this case, the operator fit_ellipse_contour_xldfit_ellipse_contour_xldFitEllipseContourXldFitEllipseContourXldFitEllipseContourXldfit_ellipse_contour_xld is typically called with the parameter ClippingEndPointsClippingEndPointsClippingEndPointsClippingEndPointsclippingEndPointsclipping_end_points set to a value greater than zero to exclude points at the beginning and the end of the contour from the computation. In order to get the geometric distances of the same set of points as used in the fitting process ClippingEndPointsClippingEndPointsClippingEndPointsClippingEndPointsclippingEndPointsclipping_end_points should take the same value.

执行信息

参数

ContourContourContourContourcontourcontour (输入对象)  xld_cont objectHXLDContHObjectHXLDContHobject

Input contours.

DistanceModeDistanceModeDistanceModeDistanceModedistanceModedistance_mode (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Mode for unsigned or signed distance values.

默认值: 'unsigned' "unsigned" "unsigned" "unsigned" "unsigned" "unsigned"

值列表: 'signed'"signed""signed""signed""signed""signed", 'unsigned'"unsigned""unsigned""unsigned""unsigned""unsigned"

ClippingEndPointsClippingEndPointsClippingEndPointsClippingEndPointsclippingEndPointsclipping_end_points (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of points at the beginning and the end of the contours to be ignored for the computation of distances.

默认值: 0

限制: ClippingEndPoints >= 0

RowRowRowRowrowrow (输入控制)  ellipse.center.y HTuplefloatHTupleHtuple (real) (double) (double) (double)

Row coordinate of the center of the ellipse.

ColumnColumnColumnColumncolumncolumn (输入控制)  ellipse.center.x HTuplefloatHTupleHtuple (real) (double) (double) (double)

Column coordinate of the center of the ellipse.

PhiPhiPhiPhiphiphi (输入控制)  ellipse.angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Orientation of the main axis in radian.

限制: Phi >= 0 && Phi <= 6.283185307

Radius1Radius1Radius1Radius1radius1radius_1 (输入控制)  ellipse.radius1 HTuplefloatHTupleHtuple (real) (double) (double) (double)

Length of the larger half axis.

限制: Radius1 > 0

Radius2Radius2Radius2Radius2radius2radius_2 (输入控制)  ellipse.radius2 HTuplefloatHTupleHtuple (real) (double) (double) (double)

Length of the smaller half axis.

限制: Radius2 >= 0 && Radius2 <= Radius1

DistancesDistancesDistancesDistancesdistancesdistances (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Distances of the contour points to the ellipse.

结果

dist_ellipse_contour_points_xlddist_ellipse_contour_points_xldDistEllipseContourPointsXldDistEllipseContourPointsXldDistEllipseContourPointsXlddist_ellipse_contour_points_xld returns 2 ( H_MSG_TRUE) if all parameter values are correct。如有必要,则抛出异常。

可能的前趋

fit_ellipse_contour_xldfit_ellipse_contour_xldFitEllipseContourXldFitEllipseContourXldFitEllipseContourXldfit_ellipse_contour_xld

替代

dist_ellipse_contour_xlddist_ellipse_contour_xldDistEllipseContourXldDistEllipseContourXldDistEllipseContourXlddist_ellipse_contour_xld

模块

基础