Operator Reference

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xld (Operator)

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xld — Smooth an XLD contour.

Signature

smooth_contours_xld(Contours : SmoothedContours : NumRegrPoints : )

Herror smooth_contours_xld(const Hobject Contours, Hobject* SmoothedContours, const Hlong NumRegrPoints)

Herror T_smooth_contours_xld(const Hobject Contours, Hobject* SmoothedContours, const Htuple NumRegrPoints)

void SmoothContoursXld(const HObject& Contours, HObject* SmoothedContours, const HTuple& NumRegrPoints)

HXLDCont HXLDCont::SmoothContoursXld(Hlong NumRegrPoints) const

static void HOperatorSet.SmoothContoursXld(HObject contours, out HObject smoothedContours, HTuple numRegrPoints)

HXLDCont HXLDCont.SmoothContoursXld(int numRegrPoints)

def smooth_contours_xld(contours: HObject, num_regr_points: int) -> HObject

Description

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xld smooths the input XLD contours ContoursContoursContourscontourscontours and returns the smoothed contours in SmoothedContoursSmoothedContoursSmoothedContourssmoothedContourssmoothed_contours. The smoothing is done by projecting the contours' points onto a local regression line (i.e., a least-squares approximating line), which is computed from NumRegrPointsNumRegrPointsNumRegrPointsnumRegrPointsnum_regr_points on each side of the current contour point. This operator should be called, for example, before contours are scaled.

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

ContoursContoursContourscontourscontours (input_object)  xld_cont-array objectHXLDContHObjectHObjectHobject

Contour to be smoothed.

SmoothedContoursSmoothedContoursSmoothedContourssmoothedContourssmoothed_contours (output_object)  xld_cont-array objectHXLDContHObjectHObjectHobject *

Smoothed contour.

NumRegrPointsNumRegrPointsNumRegrPointsnumRegrPointsnum_regr_points (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of points used to calculate the regression line.

Default: 5

Suggested values: 3, 5, 7, 9

Restriction: NumRegrPoints >= 3 && odd(NumRegrPoints)

Possible Predecessors

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, lines_gausslines_gaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixedges_sub_pix

Possible Successors

affine_trans_contour_xldaffine_trans_contour_xldAffineTransContourXldAffineTransContourXldaffine_trans_contour_xld, gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldgen_polygons_xld, local_max_contours_xldlocal_max_contours_xldLocalMaxContoursXldLocalMaxContoursXldlocal_max_contours_xld

See also

get_contour_xldget_contour_xldGetContourXldGetContourXldget_contour_xld

Module

Foundation