Skip to content

gen_parallel_contour_xldgen_parallel_contour_xldGenParallelContourXldGenParallelContourXldgen_parallel_contour_xldgen_parallel_contour_xld🔗

Short description🔗

gen_parallel_contour_xldgen_parallel_contour_xldGenParallelContourXldGenParallelContourXldgen_parallel_contour_xldgen_parallel_contour_xld — Compute the parallel contour of an XLD contour.

Signature🔗

gen_parallel_contour_xld( xld_cont Contours, out xld_cont ParallelContours, string Mode, number Distance )gen_parallel_contour_xld( Contours : ParallelContours : Mode, Distance : )void GenParallelContourXld( const HObject& Contours, HObject* ParallelContours, const HTuple& Mode, const HTuple& Distance )static void HOperatorSet.GenParallelContourXld( HObject contours, out HObject parallelContours, HTuple mode, HTuple distance )def gen_parallel_contour_xld( contours: HObject, mode: str, distance: Union[float, int] ) -> HObject

Herror gen_parallel_contour_xld( const Hobject Contours, Hobject* ParallelContours, const char* Mode, double Distance )

Herror T_gen_parallel_contour_xld( const Hobject Contours, Hobject* ParallelContours, const Htuple Mode, const Htuple Distance )

HXLDCont HXLDCont::GenParallelContourXld( const HString& Mode, const HTuple& Distance ) const

HXLDCont HXLDCont::GenParallelContourXld( const HString& Mode, double Distance ) const

HXLDCont HXLDCont::GenParallelContourXld( const char* Mode, double Distance ) const

HXLDCont HXLDCont::GenParallelContourXld( const wchar_t* Mode, double Distance ) const (Windows only)

HXLDCont HXLDCont.GenParallelContourXld( string mode, HTuple distance )

HXLDCont HXLDCont.GenParallelContourXld( string mode, double distance )

Description🔗

gen_parallel_contour_xldGenParallelContourXld computes for each of the input contours Contourscontourscontours a parallel contour with distance Distancedistancedistance. The resulting contours are returned in ParallelContoursparallelContoursparallel_contours. To calculate the parallel contour, the normal vector of the input contour is needed in every contour point. The parameter Modemodemode determines how these normal vectors are computed. If Modemodemode = 'gradient'"gradient", it is assumed that the input contours are edges, and the normal information is obtained from the gradient direction of the edge (see edges_sub_pixEdgesSubPix). For this, the attribute 'edge_direction'"edge_direction" must exist for the input contour (see get_contour_attrib_xldGetContourAttribXld). If Modemodemode = 'contour_normal'"contour_normal", a possibly existing normal information is used to determine the normals. For this, the contour attribute 'angle'"angle" must exist (see lines_gaussLinesGauss or edges_sub_pixEdgesSubPix). Finally, if Modemodemode = 'regression_normal'"regression_normal", the normal vectors are determined from a local line fit to each contour point. Here, the normal vectors are oriented such that they point to the right side of the contour when the contour is traversed from start to end. In contrast to the first two modes, this mode can be used for all XLD contours, no matter how they were generated.

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 transformed.

ParallelContoursparallelContoursparallel_contours (output_object) xld_cont-array → objectobjectHObjectHXLDContHObjectHobject *

Parallel contours.

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

Mode, with which the direction information is computed.

Default: 'regression_normal'"regression_normal"
Suggested values: 'gradient', 'contour_normal', 'regression_normal'"gradient", "contour_normal", "regression_normal"

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

Distance of the parallel contour.

Default: 11
Suggested values: 0.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, 7, 10, 15, 20, 30, 40, 500.2, 0.4, 0.6, 0.8, 1, 2, 3, 4, 5, 7, 10, 15, 20, 30, 40, 50

Combinations with other operators🔗

Combinations

Possible predecessors

gen_contours_skeleton_xldGenContoursSkeletonXld, lines_gaussLinesGauss, lines_facetLinesFacet, edges_sub_pixEdgesSubPix, threshold_sub_pixThresholdSubPix

Possible successors

gen_polygons_xldGenPolygonsXld

See also

get_contour_xldGetContourXld

Module🔗

Foundation