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

Merge neighboring straight contours having a similar distance from a given line.

union_straight_contours_histo_xld merges neighboring XLD contours Contours if certain criteria are fulfilled.

The maximum and minium distance of the contours to an given reference line are calculated. From this distances a histogram is created. If the histogram should be smoothed, FilterSize must be greater then 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 Range is greater than MaxWidth, all contours in this range are ignored (removed). Lies an contour in two ranges or more it is also ignored. In case there are parallel contours, there is a danger of merging neighboring contours.

The parameters of the regression line are calculated new for merged contours.

The resulting contours cannot be displayed.


Attention

Before the contour parameters can be returned by union_straight_contours_histo_xld, the parameters of the regression line to the contour must be calculated by calling regress_contours_xld.


Parameters

Contours (input_object)
xld_cont-array -> object
Input XLD contours.

UnionContours (output_object)
xld_cont-array -> object
Output XLD contours.

SelectedContours (output_object)
xld_cont-array -> object
Output XLD contours.

RefLineStartRow (input_control)
line.begin.y -> integer
y coordinate of the starting point of the reference line.
Default value: 0

RefLineStartColumn (input_control)
line.begin.x -> integer
x coordinate of the starting point of the reference line.
Default value: 0

RefLineEndRow (input_control)
line.end.y -> integer
y coordinate of the endpoint of the reference line.
Default value: 0

RefLineEndColumn (input_control)
line.end.x -> integer
x coordinate of the endpoint of the reference line.
Default value: 0

Width (input_control)
integer -> integer
Maximum distance.
Default value: 1

MaxWidth (input_control)
integer -> integer
Maximum Width between two minimas.
Default value: 1

FilterSize (input_control)
integer -> integer
Size of Smoothfilter
Default value: 1
Typical range of values: 1 <= FilterSize <= 63

HistoValues (output_control)
integer-array -> integer
Output Values of Histogram.


Parallelization Information

union_straight_contours_histo_xld is reentrant and processed without parallelization.


Possible Predecessors

regress_contours_xld


See also

fit_line_contour_xld, get_contour_xld, get_contour_attrib_xld, gen_contours_skeleton_xld, lines_gauss, lines_facet, edges_sub_pix, get_regress_params_xld, get_contour_global_attrib_xld, query_contour_global_attribs_xld


Module

Sub-pixel operators



Copyright © 1996-2005 MVTec Software GmbH