Skip to content

union_straight_contours_histo_xldunion_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xldT_union_straight_contours_histo_xld🔗

Short description🔗

union_straight_contours_histo_xldunion_straight_contours_histo_xldUnionStraightContoursHistoXldUnionStraightContoursHistoXldunion_straight_contours_histo_xldT_union_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_xldUnionStraightContoursHistoXld 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( xld_cont Contours, out xld_cont UnionContours, out xld_cont SelectedContours, line.begin.y RefLineStartRow, line.begin.x RefLineStartColumn, line.end.y RefLineEndRow, line.end.x RefLineEndColumn, integer Width, integer MaxWidth, integer FilterSize, out integer HistoValues )union_straight_contours_histo_xld( Contours : UnionContours, SelectedContours : RefLineStartRow, RefLineStartColumn, RefLineEndRow, RefLineEndColumn, Width, MaxWidth, FilterSize : 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 )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 )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]]

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 )

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

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

Description🔗

union_straight_contours_histo_xldUnionStraightContoursHistoXld merges neighboring XLD contours Contourscontourscontours 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, FilterSizefilterSizefilter_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 MaxWidthmaxWidthmax_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 contours can be united by union_straight_contours_histo_xldUnionStraightContoursHistoXld, the parameters of the regression lines to the contours must be calculated by calling regress_contours_xldRegressContoursXld. Note further that already closed contours are not considered for a union anymore.

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.

SelectedContoursselectedContoursselected_contours (output_object) xld_cont-array → objectobjectHObjectHXLDContHObjectHobject *

Output XLD contours.

RefLineStartRowrefLineStartRowref_line_start_row (input_control) line.begin.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

y coordinate of the starting point of the reference line.

Default: 00

RefLineStartColumnrefLineStartColumnref_line_start_column (input_control) line.begin.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

x coordinate of the starting point of the reference line.

Default: 00

RefLineEndRowrefLineEndRowref_line_end_row (input_control) line.end.y → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

y coordinate of the endpoint of the reference line.

Default: 00

RefLineEndColumnrefLineEndColumnref_line_end_column (input_control) line.end.x → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

x coordinate of the endpoint of the reference line.

Default: 00

Widthwidthwidth (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Maximum distance.

Default: 11

MaxWidthmaxWidthmax_width (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Maximum width between two minima.

Default: 11

FilterSizefilterSizefilter_size (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Size of smoothing filter

Default: 11
Value range: 1 ≤ FilterSize ≤ 63

HistoValueshistoValueshisto_values (output_control) integer-array → (integer)(integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Output values of histogram.

Module🔗

Foundation