dist_rectangle2_contour_points_xldT_dist_rectangle2_contour_points_xldDistRectangle2ContourPointsXldDistRectangle2ContourPointsXlddist_rectangle2_contour_points_xld (算子)

名称

dist_rectangle2_contour_points_xldT_dist_rectangle2_contour_points_xldDistRectangle2ContourPointsXldDistRectangle2ContourPointsXlddist_rectangle2_contour_points_xld — 计算所有轮廓点到矩形的距离。

签名

dist_rectangle2_contour_points_xld(Contour : : ClippingEndPoints, Row, Column, Phi, Length1, Length2 : Distances)

Herror T_dist_rectangle2_contour_points_xld(const Hobject Contour, const Htuple ClippingEndPoints, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Length1, const Htuple Length2, Htuple* Distances)

void DistRectangle2ContourPointsXld(const HObject& Contour, const HTuple& ClippingEndPoints, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Length1, const HTuple& Length2, HTuple* Distances)

HTuple HXLDCont::DistRectangle2ContourPointsXld(Hlong ClippingEndPoints, double Row, double Column, double Phi, double Length1, double Length2) const

static void HOperatorSet.DistRectangle2ContourPointsXld(HObject contour, HTuple clippingEndPoints, HTuple row, HTuple column, HTuple phi, HTuple length1, HTuple length2, out HTuple distances)

HTuple HXLDCont.DistRectangle2ContourPointsXld(int clippingEndPoints, double row, double column, double phi, double length1, double length2)

def dist_rectangle2_contour_points_xld(contour: HObject, clipping_end_points: int, row: float, column: float, phi: float, length_1: float, length_2: float) -> Sequence[float]

描述

dist_rectangle2_contour_points_xlddist_rectangle2_contour_points_xldDistRectangle2ContourPointsXldDistRectangle2ContourPointsXldDistRectangle2ContourPointsXlddist_rectangle2_contour_points_xld determines the Euclidean distances between the points of a contour ContourContourContourContourcontourcontour and a rectangle of arbitrary orientation specified by the center (RowRowRowRowrowrow, ColumnColumnColumnColumncolumncolumn), the orientation PhiPhiPhiPhiphiphi, and the half edge lengths Length1Length1Length1Length1length1length_1 and Length2Length2Length2Length2length2length_2. The angle PhiPhiPhiPhiphiphi must be given in radians and specifies the angle between the horizontal axis and the edge with the half length Length1Length1Length1Length1length1length_1 in the mathematically positive direction (counterclockwise).

Depending on the processing used to create ContourContourContourContourcontourcontour, the start and end points of a contour may contain positional errors. In this case, the operator fit_rectangle2_contour_xldfit_rectangle2_contour_xldFitRectangle2ContourXldFitRectangle2ContourXldFitRectangle2ContourXldfit_rectangle2_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. To compute the distances of the same set of points as used in the fitting process, ClippingEndPointsClippingEndPointsClippingEndPointsClippingEndPointsclippingEndPointsclipping_end_points should be set to the same value as in fit_rectangle2_contour_xldfit_rectangle2_contour_xldFitRectangle2ContourXldFitRectangle2ContourXldFitRectangle2ContourXldfit_rectangle2_contour_xld

执行信息

参数

ContourContourContourContourcontourcontour (输入对象)  xld_cont objectHXLDContHObjectHXLDContHobject

Input contour.

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

建议值: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

限制: ClippingEndPoints >= 0

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

Row coordinate of the center of the rectangle.

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

Column coordinate of the center of the rectangle.

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

Orientation of the main axis of the rectangle [rad].

Length1Length1Length1Length1length1length_1 (输入控制)  rectangle2.hwidth HTuplefloatHTupleHtuple (real) (double) (double) (double)

First radius (half length) of the rectangle.

限制: Length1 > 0

Length2Length2Length2Length2length2length_2 (输入控制)  rectangle2.hheight HTuplefloatHTupleHtuple (real) (double) (double) (double)

Second radius (half width) of the rectangle.

限制: Length2 >= 0

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

Distances of the contour points to the rectangle.

结果

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

可能的前趋

fit_rectangle2_contour_xldfit_rectangle2_contour_xldFitRectangle2ContourXldFitRectangle2ContourXldFitRectangle2ContourXldfit_rectangle2_contour_xld

模块

基础