Skip to content

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xldsmooth_contours_xldπŸ”—

Short descriptionπŸ”—

smooth_contours_xldsmooth_contours_xldSmoothContoursXldSmoothContoursXldsmooth_contours_xldsmooth_contours_xld β€” Smooth an XLD contour.

SignatureπŸ”—

smooth_contours_xld( xld_cont Contours, out xld_cont SmoothedContours, integer NumRegrPoints )smooth_contours_xld( Contours : SmoothedContours : NumRegrPoints : )void SmoothContoursXld( const HObject& Contours, HObject* SmoothedContours, const HTuple& NumRegrPoints )static void HOperatorSet.SmoothContoursXld( HObject contours, out HObject smoothedContours, HTuple numRegrPoints )def smooth_contours_xld( contours: HObject, num_regr_points: int ) -> HObject

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 )

HXLDCont HXLDCont::SmoothContoursXld( Hlong NumRegrPoints ) const

HXLDCont HXLDCont.SmoothContoursXld( int numRegrPoints )

DescriptionπŸ”—

smooth_contours_xldSmoothContoursXld smooths the input XLD contours Contourscontourscontours and returns the smoothed contours in SmoothedContourssmoothedContourssmoothed_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 NumRegrPointsnumRegrPointsnum_regr_points on each side of the current contour point. This operator should be called, for example, before contours are scaled.

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

Contour to be smoothed.

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

Smoothed contour.

NumRegrPointsnumRegrPointsnum_regr_points (input_control) integer β†’ (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of points used to calculate the regression line.

Default: 55
Suggested values: 3, 5, 7, 93, 5, 7, 9
Restriction: NumRegrPoints >= 3 && odd(NumRegrPoints)

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

gen_contours_skeleton_xldGenContoursSkeletonXld, lines_gaussLinesGauss, lines_facetLinesFacet, edges_sub_pixEdgesSubPix

Possible successors

affine_trans_contour_xldAffineTransContourXld, gen_polygons_xldGenPolygonsXld, local_max_contours_xldLocalMaxContoursXld

See also

get_contour_xldGetContourXld

ModuleπŸ”—

Foundation