Skip to content

union_collinear_contours_ext_xldunion_collinear_contours_ext_xldUnionCollinearContoursExtXldUnionCollinearContoursExtXldunion_collinear_contours_ext_xldunion_collinear_contours_ext_xldπŸ”—

Short descriptionπŸ”—

union_collinear_contours_ext_xldunion_collinear_contours_ext_xldUnionCollinearContoursExtXldUnionCollinearContoursExtXldunion_collinear_contours_ext_xldunion_collinear_contours_ext_xld β€” Compute the union of collinear contours (operator with extended functionality).

SignatureπŸ”—

union_collinear_contours_ext_xld( xld_cont Contours, out xld_cont UnionContours, real MaxDistAbs, real MaxDistRel, real MaxShift, real MaxAngle, real MaxOverlap, real MaxRegrError, real MaxCosts, real WeightDist, real WeightShift, real WeightAngle, real WeightLink, real WeightRegr, string Mode )union_collinear_contours_ext_xld( Contours : UnionContours : MaxDistAbs, MaxDistRel, MaxShift, MaxAngle, MaxOverlap, MaxRegrError, MaxCosts, WeightDist, WeightShift, WeightAngle, WeightLink, WeightRegr, Mode : )void UnionCollinearContoursExtXld( const HObject& Contours, HObject* UnionContours, const HTuple& MaxDistAbs, const HTuple& MaxDistRel, const HTuple& MaxShift, const HTuple& MaxAngle, const HTuple& MaxOverlap, const HTuple& MaxRegrError, const HTuple& MaxCosts, const HTuple& WeightDist, const HTuple& WeightShift, const HTuple& WeightAngle, const HTuple& WeightLink, const HTuple& WeightRegr, const HTuple& Mode )static void HOperatorSet.UnionCollinearContoursExtXld( HObject contours, out HObject unionContours, HTuple maxDistAbs, HTuple maxDistRel, HTuple maxShift, HTuple maxAngle, HTuple maxOverlap, HTuple maxRegrError, HTuple maxCosts, HTuple weightDist, HTuple weightShift, HTuple weightAngle, HTuple weightLink, HTuple weightRegr, HTuple mode )def union_collinear_contours_ext_xld( contours: HObject, max_dist_abs: float, max_dist_rel: float, max_shift: float, max_angle: float, max_overlap: float, max_regr_error: float, max_costs: float, weight_dist: float, weight_shift: float, weight_angle: float, weight_link: float, weight_regr: float, mode: str ) -> HObject

Herror union_collinear_contours_ext_xld( const Hobject Contours, Hobject* UnionContours, double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, double MaxOverlap, double MaxRegrError, double MaxCosts, double WeightDist, double WeightShift, double WeightAngle, double WeightLink, double WeightRegr, const char* Mode )

Herror T_union_collinear_contours_ext_xld( const Hobject Contours, Hobject* UnionContours, const Htuple MaxDistAbs, const Htuple MaxDistRel, const Htuple MaxShift, const Htuple MaxAngle, const Htuple MaxOverlap, const Htuple MaxRegrError, const Htuple MaxCosts, const Htuple WeightDist, const Htuple WeightShift, const Htuple WeightAngle, const Htuple WeightLink, const Htuple WeightRegr, const Htuple Mode )

HXLDCont HXLDCont::UnionCollinearContoursExtXld( double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, double MaxOverlap, double MaxRegrError, double MaxCosts, double WeightDist, double WeightShift, double WeightAngle, double WeightLink, double WeightRegr, const HString& Mode ) const

HXLDCont HXLDCont::UnionCollinearContoursExtXld( double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, double MaxOverlap, double MaxRegrError, double MaxCosts, double WeightDist, double WeightShift, double WeightAngle, double WeightLink, double WeightRegr, const char* Mode ) const

HXLDCont HXLDCont::UnionCollinearContoursExtXld( double MaxDistAbs, double MaxDistRel, double MaxShift, double MaxAngle, double MaxOverlap, double MaxRegrError, double MaxCosts, double WeightDist, double WeightShift, double WeightAngle, double WeightLink, double WeightRegr, const wchar_t* Mode ) const (Windows only)

HXLDCont HXLDCont.UnionCollinearContoursExtXld( double maxDistAbs, double maxDistRel, double maxShift, double maxAngle, double maxOverlap, double maxRegrError, double maxCosts, double weightDist, double weightShift, double weightAngle, double weightLink, double weightRegr, string mode )

DescriptionπŸ”—

Like union_collinear_contours_xldUnionCollinearContoursXld, the operator union_collinear_contours_ext_xldUnionCollinearContoursExtXld detects all the collinear contours within the input array containing straight contours (Contourscontourscontours) and returns the results in UnionContoursunionContoursunion_contours. The basic behavior is identical to the operator union_collinear_contours_xldUnionCollinearContoursXld and is described there. union_collinear_contours_ext_xldUnionCollinearContoursExtXld, however, provides several additional parameters to control the process of contour unification more precisely.

Parameters

The parameters MaxDistAbsmaxDistAbsmax_dist_abs, MaxDistRelmaxDistRelmax_dist_rel, MaxShiftmaxShiftmax_shift, and MaxAnglemaxAnglemax_angle operate as described for the operator union_collinear_contours_xldUnionCollinearContoursXld.

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

Input XLD contours.

UnionContoursunionContoursunion_contours (output_object) xld_cont-array β†’ objectobjectHObjectHXLDContHObjectHobject *

Output XLD contours.

MaxDistAbsmaxDistAbsmax_dist_abs (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum distance of the contours’ end points in the direction of the reference regression line.

Default: 10.010.0
Value range: 0.0 ≀ MaxDistAbs

MaxDistRelmaxDistRelmax_dist_rel (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum distance of the contours’ end points in the direction of the reference regression line in relation to the length of the contour which is to be elongated.

Default: 1.01.0
Value range: 0.0 ≀ MaxDistRel

MaxShiftmaxShiftmax_shift (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum distance of the contour from the reference regression line (i.e., perpendicular to the line).

Default: 2.02.0
Value range: 0.0 ≀ MaxShift

MaxAnglemaxAnglemax_angle (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum angle difference between the two contours.

Default: 0.10.1
Value range: 0.0 ≀ MaxAngle ≀ 0.78539816339

MaxOverlapmaxOverlapmax_overlap (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum range of the overlap.

Default: 0.00.0
Value range: 0.0 ≀ MaxOverlap

MaxRegrErrormaxRegrErrormax_regr_error (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Maximum regression error of the resulting contours (NOT USED).

Default: -1.0-1.0

MaxCostsmaxCostsmax_costs (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Threshold for reducing the total costs of unification.

Default: 1.01.0
Value range: 0.0 ≀ MaxCosts

WeightDistweightDistweight_dist (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Influence of the distance in the line direction on the total costs.

Default: 1.01.0
Value range: 0.0 ≀ WeightDist

WeightShiftweightShiftweight_shift (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Influence of the distance from the regression line on the total costs.

Default: 1.01.0
Value range: 0.0 ≀ WeightShift

WeightAngleweightAngleweight_angle (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Influence of the angle difference on the total costs.

Default: 1.01.0
Value range: 0.0 ≀ WeightAngle

WeightLinkweightLinkweight_link (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Influence of the line disturbance by the linking segment (overlap and angle difference) on the total costs.

Default: 1.01.0
Value range: 0.0 ≀ WeightLink

WeightRegrweightRegrweight_regr (input_control) real β†’ (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Influence of the regression error on the total costs (NOT USED).

Default: 0.00.0
Value range: 0.0 ≀ WeightRegr

Modemodemode (input_control) string β†’ (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Mode describing the treatment of the contours’ attributes

Default: 'attr_keep'"attr_keep"
List of values: 'attr_forget', 'attr_keep'"attr_forget", "attr_keep"

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

split_contours_xldSplitContoursXld, select_contours_xldSelectContoursXld

Alternatives

union_collinear_contours_xldUnionCollinearContoursXld, union_cocircular_contours_xldUnionCocircularContoursXld, union_cotangential_contours_xldUnionCotangentialContoursXld, union_adjacent_contours_xldUnionAdjacentContoursXld, union_straight_contours_xldUnionStraightContoursXld

See also

edges_sub_pixEdgesSubPix, threshold_sub_pixThresholdSubPix, gen_polygons_xldGenPolygonsXld, split_contours_xldSplitContoursXld, select_contours_xldSelectContoursXld, get_contour_xldGetContourXld, get_contour_attrib_xldGetContourAttribXld

ModuleπŸ”—

Foundation