gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld (算子名称)
名称
gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld — Approximate XLD contours by polygons.
参数签名
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 (input_object) xld_cont-array → objectHXLDContHObjectHXLDContHobject
Contours to be approximated.
PolygonsPolygonsPolygonsPolygonspolygonspolygons (output_object) xld_poly-array → objectHXLDPolyHObjectHXLDPolyHobject *
Approximating polygons.
TypeTypeTypeTypetypetype (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Type of approximation.
Default:
'ramer'
"ramer"
"ramer"
"ramer"
"ramer"
"ramer"
List of values:
'ramer'"ramer""ramer""ramer""ramer""ramer"
AlphaAlphaAlphaAlphaalphaalpha (input_control) number → HTupleUnion[float, int]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Threshold for the approximation.
Default:
2.0
Suggested values:
1.0, 1.5, 2.0, 3.0, 4.0
Restriction:
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
模块
Foundation