union_straight_contours_histo_xldT_union_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xld (Operator)

Name

union_straight_contours_histo_xldT_union_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xld — Compute the union of neighboring straight contours that have a similar distance from a given line.

Warning

union_straight_contours_histo_xldunion_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xld is obsolete and is only provided for reasons of backward compatibility. New applications should use the operators of the chapter 1D Measuring instead.

Signature

union_straight_contours_histo_xld(Contours : UnionContours, SelectedContours : RefLineStartRow, RefLineStartColumn, RefLineEndRow, RefLineEndColumn, Width, MaxWidth, FilterSize : HistoValues)

Herror T_union_straight_contours_histo_xld(const Hobject Contours, Hobject* UnionContours, Hobject* SelectedContours, const Htuple RefLineStartRow, const Htuple RefLineStartColumn, const Htuple RefLineEndRow, const Htuple RefLineEndColumn, const Htuple Width, const Htuple MaxWidth, const Htuple FilterSize, Htuple* HistoValues)

void UnionStraightContoursHistoXld(const HObject& Contours, HObject* UnionContours, HObject* SelectedContours, const HTuple& RefLineStartRow, const HTuple& RefLineStartColumn, const HTuple& RefLineEndRow, const HTuple& RefLineEndColumn, const HTuple& Width, const HTuple& MaxWidth, const HTuple& FilterSize, HTuple* HistoValues)

HXLDCont HXLDCont::UnionStraightContoursHistoXld(HXLDCont* SelectedContours, Hlong RefLineStartRow, Hlong RefLineStartColumn, Hlong RefLineEndRow, Hlong RefLineEndColumn, Hlong Width, Hlong MaxWidth, Hlong FilterSize, HTuple* HistoValues) const

static void HOperatorSet.UnionStraightContoursHistoXld(HObject contours, out HObject unionContours, out HObject selectedContours, HTuple refLineStartRow, HTuple refLineStartColumn, HTuple refLineEndRow, HTuple refLineEndColumn, HTuple width, HTuple maxWidth, HTuple filterSize, out HTuple histoValues)

HXLDCont HXLDCont.UnionStraightContoursHistoXld(out HXLDCont selectedContours, int refLineStartRow, int refLineStartColumn, int refLineEndRow, int refLineEndColumn, int width, int maxWidth, int filterSize, out HTuple histoValues)

def union_straight_contours_histo_xld(contours: HObject, ref_line_start_row: int, ref_line_start_column: int, ref_line_end_row: int, ref_line_end_column: int, width: int, max_width: int, filter_size: int) -> Tuple[HObject, HObject, Sequence[int]]

Description

union_straight_contours_histo_xldunion_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xld merges neighboring XLD contours ContoursContoursContoursContourscontourscontours if certain criteria are fulfilled.

The maximum and minimum distances of the contours to a given reference line are calculated. From this distances a histogram is created. If the histogram should be smoothed, FilterSizeFilterSizeFilterSizeFilterSizefilterSizefilter_size must be greater than one. Afterwards, the resulting histogram is divided into ranges (from minima to minima). Contours which lie in the same range are concatenated to a new contour. If the width of the range is greater than MaxWidthMaxWidthMaxWidthMaxWidthmaxWidthmax_width, all contours in this range are ignored (removed). If a contour lies in two ranges or more it is ignored, too. If there are parallel contours, there is a risk of merging neighboring contours.

The parameters of the regression lines are calculated newly for merged contours.

The resulting contours cannot be displayed.

Attention

Before the contour parameters can be returned by union_straight_contours_histo_xldunion_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xld, the parameters of the regression line to the contour must be calculated by calling regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXldregress_contours_xld. Note further that already closed contours are not considered for a union anymore.

Execution Information

Parameters

ContoursContoursContoursContourscontourscontours (input_object)  xld_cont-array objectHXLDContHObjectHXLDContHobject

Input XLD contours.

UnionContoursUnionContoursUnionContoursUnionContoursunionContoursunion_contours (output_object)  xld_cont-array objectHXLDContHObjectHXLDContHobject *

Output XLD contours.

SelectedContoursSelectedContoursSelectedContoursSelectedContoursselectedContoursselected_contours (output_object)  xld_cont-array objectHXLDContHObjectHXLDContHobject *

Output XLD contours.

RefLineStartRowRefLineStartRowRefLineStartRowRefLineStartRowrefLineStartRowref_line_start_row (input_control)  line.begin.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

y coordinate of the starting point of the reference line.

Default value: 0

RefLineStartColumnRefLineStartColumnRefLineStartColumnRefLineStartColumnrefLineStartColumnref_line_start_column (input_control)  line.begin.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

x coordinate of the starting point of the reference line.

Default value: 0

RefLineEndRowRefLineEndRowRefLineEndRowRefLineEndRowrefLineEndRowref_line_end_row (input_control)  line.end.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

y coordinate of the endpoint of the reference line.

Default value: 0

RefLineEndColumnRefLineEndColumnRefLineEndColumnRefLineEndColumnrefLineEndColumnref_line_end_column (input_control)  line.end.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

x coordinate of the endpoint of the reference line.

Default value: 0

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

Maximum distance.

Default value: 1

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

Maximum width between two minima.

Default value: 1

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

Size of smoothing filter

Default value: 1

Typical range of values: 1 ≤ FilterSize FilterSize FilterSize FilterSize filterSize filter_size ≤ 63

HistoValuesHistoValuesHistoValuesHistoValueshistoValueshisto_values (output_control)  integer-array HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Output values of histogram.

Module

Foundation