diameter_xlddiameter_xldDiameterXldDiameterXlddiameter_xld (算子)

名称

diameter_xlddiameter_xldDiameterXldDiameterXlddiameter_xld — 两个轮廓点或多边形点之间的最大距离。

签名

diameter_xld(XLD : : : Row1, Column1, Row2, Column2, Diameter)

Herror diameter_xld(const Hobject XLD, double* Row1, double* Column1, double* Row2, double* Column2, double* Diameter)

Herror T_diameter_xld(const Hobject XLD, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2, Htuple* Diameter)

void DiameterXld(const HObject& XLD, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter)

void HXLD::DiameterXld(HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter) const

void HXLD::DiameterXld(double* Row1, double* Column1, double* Row2, double* Column2, double* Diameter) const

static void HOperatorSet.DiameterXld(HObject XLD, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2, out HTuple diameter)

void HXLD.DiameterXld(out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2, out HTuple diameter)

void HXLD.DiameterXld(out double row1, out double column1, out double row2, out double column2, out double diameter)

def diameter_xld(xld: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def diameter_xld_s(xld: HObject) -> Tuple[float, float, float, float, float]

描述

算子 diameter_xlddiameter_xldDiameterXldDiameterXldDiameterXlddiameter_xld calculates the maximum distance between two points of each input contour or polygon. The coordinates of these two extremes and the distance between them will be returned. The input contour or polygon must not intersect itself, otherwise the resulting parameters are not meaningful (Whether the input contour or polygon intersects itself or not can be determined with test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld). If the input contour or polygon is not closed it will be closed automatically. 如果传递多个轮廓或多边形,结果将按其在 XLDXLDXLDXLDXLDxld 中的顺序存储为元组。

注意

If the contour or polygon is empty, the results of Row1Row1Row1Row1row1row_1, Column1Column1Column1Column1column1column_1, Row2Row2Row2Row2row2row_2 and Column2Column2Column2Column2column2column_2 (all of them = 0) may lead to confusion.

执行信息

参数

XLDXLDXLDXLDXLDxld (输入对象)  xld(-array) objectHXLDHObjectHXLDHobject

待检查的轮廓或多边形。

Row1Row1Row1Row1row1row_1 (输出控制)  line.begin.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinate of the first extreme point of the contours or polygons.

Column1Column1Column1Column1column1column_1 (输出控制)  line.begin.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinate of the first extreme point of the contours or polygons.

Row2Row2Row2Row2row2row_2 (输出控制)  line.end.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Row coordinate of the second extreme point of the contour or polygons.

Column2Column2Column2Column2column2column_2 (输出控制)  line.end.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Column coordinate of the second extreme point of the contours or polygons.

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

Distance of the two extreme points of the contours or polygons.

结果

算子 diameter_xlddiameter_xldDiameterXldDiameterXldDiameterXlddiameter_xld 返回值 2 ( H_MSG_TRUE) , if the input is not empty. The reaction to empty input (no input contours are available) may be determined with the help of the operator set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的前趋

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXldgen_contour_polygon_xld, test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXldtest_self_intersection_xld

替代

smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld

另见

area_center_xldarea_center_xldAreaCenterXldAreaCenterXldAreaCenterXldarea_center_xld

模块

基础