Skip to content

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xldgen_polygons_xld🔗

Short description🔗

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xldgen_polygons_xld — Approximate XLD contours by polygons.

Signature🔗

gen_polygons_xld( xld_cont Contours, out xld_poly Polygons, string Type, number Alpha )gen_polygons_xld( Contours : Polygons : Type, Alpha : )void GenPolygonsXld( const HObject& Contours, HObject* Polygons, const HTuple& Type, const HTuple& Alpha )static void HOperatorSet.GenPolygonsXld( HObject contours, out HObject polygons, HTuple type, HTuple alpha )def gen_polygons_xld( contours: HObject, type: str, alpha: Union[float, int] ) -> HObject

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 )

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)

HXLDPoly HXLDCont.GenPolygonsXld( string type, HTuple alpha )

HXLDPoly HXLDCont.GenPolygonsXld( string type, double alpha )

Description🔗

gen_polygons_xldGenPolygonsXld approximates XLD contours (Contourscontourscontours) by polygons. The type of the approximation can be set by Typetypetype. The threshold for the approximation is set via Alphaalphaalpha. The procedure is able to process open as well as closed contours. The resulting approximating XLD polygons are returned in Polygonspolygonspolygons.

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 Alphaalphaalpha pixel units.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Contourscontourscontours (input_object) xld_cont-array → objectobjectHObjectHXLDContHObjectHobject

Contours to be approximated.

Polygonspolygonspolygons (output_object) xld_poly-array → objectobjectHObjectHXLDPolyHObjectHobject *

Approximating polygons.

Typetypetype (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Type of approximation.

Default: 'ramer'"ramer"
List of values: 'ramer'"ramer"

Alphaalphaalpha (input_control) number → (real / integer)(real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[float, int]Htuple (double / Hlong)

Threshold for the approximation.

Default: 2.02.0
Suggested values: 1.0, 1.5, 2.0, 3.0, 4.01.0, 1.5, 2.0, 3.0, 4.0
Restriction: Alpha > 0.0

Combinations with other operators🔗

Combinations

Possible predecessors

gen_contours_skeleton_xldGenContoursSkeletonXld, lines_gaussLinesGauss, lines_facetLinesFacet, edges_sub_pixEdgesSubPix

Possible successors

gen_parallels_xldGenParallelsXld, split_contours_xldSplitContoursXld

See also

get_region_polygonGetRegionPolygon

Module🔗

Foundation