gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld (算子)

名称

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld — 通过多边形近似 XLD 轮廓。

签名

gen_polygons_xld(Contours : Polygons : Type, Alpha : )

Herror gen_polygons_xld(const Hobject Contours, Hobject* Polygons, const char* Type, double Alpha)

Herror T_gen_polygons_xld(const Hobject Contours, Hobject* Polygons, const Htuple Type, const Htuple Alpha)

void GenPolygonsXld(const HObject& Contours, HObject* Polygons, const HTuple& Type, const HTuple& Alpha)

HXLDPoly HXLDCont::GenPolygonsXld(const HString& Type, const HTuple& Alpha) const

HXLDPoly HXLDCont::GenPolygonsXld(const HString& Type, double Alpha) const

HXLDPoly HXLDCont::GenPolygonsXld(const char* Type, double Alpha) const

HXLDPoly HXLDCont::GenPolygonsXld(const wchar_t* Type, double Alpha) const   ( Windows only)

static void HOperatorSet.GenPolygonsXld(HObject contours, out HObject polygons, HTuple type, HTuple alpha)

HXLDPoly HXLDCont.GenPolygonsXld(string type, HTuple alpha)

HXLDPoly HXLDCont.GenPolygonsXld(string type, double alpha)

def gen_polygons_xld(contours: HObject, type: str, alpha: Union[float, int]) -> HObject

描述

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXldgen_polygons_xld approximates XLD contours (ContoursContoursContoursContourscontourscontours) by polygons. The type of the approximation can be set by TypeTypeTypeTypetypetype. The threshold for the approximation is set via AlphaAlphaAlphaAlphaalphaalpha. The procedure is able to process open as well as closed contours. The resulting approximating XLD polygons are returned in PolygonsPolygonsPolygonsPolygonspolygonspolygons

Contours can be approximated by the algorithm of Ramer, which approximates contours such that the Euclidean distance of the approximating polygon to the contour is at most AlphaAlphaAlphaAlphaalphaalpha pixel units.

执行信息

参数

ContoursContoursContoursContourscontourscontours (输入对象)  xld_cont-array objectHXLDContHObjectHXLDContHobject

Contours to be approximated.

PolygonsPolygonsPolygonsPolygonspolygonspolygons (输出对象)  xld_poly-array objectHXLDPolyHObjectHXLDPolyHobject *

Approximating polygons.

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

Type of approximation.

默认值: 'ramer' "ramer" "ramer" "ramer" "ramer" "ramer"

值列表: 'ramer'"ramer""ramer""ramer""ramer""ramer"

AlphaAlphaAlphaAlphaalphaalpha (输入控制)  number HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Threshold for the approximation.

默认值: 2.0

建议值: 1.0, 1.5, 2.0, 3.0, 4.0

限制: Alpha > 0.0

可能的前趋

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix

可能的后继

gen_parallels_xldgen_parallels_xldGenParallelsXldGenParallelsXldGenParallelsXldgen_parallels_xld, split_contours_xldsplit_contours_xldSplitContoursXldSplitContoursXldSplitContoursXldsplit_contours_xld

另见

get_region_polygonget_region_polygonGetRegionPolygonGetRegionPolygonGetRegionPolygonget_region_polygon

模块

基础