Herror ::union_straight_contours_histo_xld (
    Hobject Contours,
    Hobject *UnionContours,
    Hobject *SelectedContours,
    const HTuple &RefLineStartY,
    const HTuple &RefLineStartX,
    const HTuple &RefLineEndY,
    const HTuple &RefLineEndX,
    const HTuple &nWidth,
    const HTuple &MaxWidth,
    const HTuple &FilterSize,
    HTuple *HistoValues
)
HXLDContArray HXLDContArray::UnionStraightContoursHistoXld (
    HXLDContArray *SelectedContours,
    const HTuple &RefLineStartY,
    const HTuple &RefLineStartX,
    const HTuple &RefLineEndY,
    const HTuple &RefLineEndX,
    const HTuple &NWidth,
    const HTuple &MaxWidth,
    const HTuple &FilterSize,
    HTuple *HistoValues
) const

Merge neighboring straight contours having a similar direction.

::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 diveded 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 anew 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 -> Hobject: HXLDContArray
Input XLD contours.

UnionContours (output_object)
xld_cont-array -> Hobject * : HXLDContArray
Output XLD contours.

SelectedContours (output_object)
xld_cont-array -> Hobject * : HXLDContArray
Output XLD contours.

RefLineStartY (input_control)
integer -> HTuple.long
y coordinate of the starting point of the reference line.
Default value: 0

RefLineStartX (input_control)
integer -> HTuple.long
x coordinate of the starting point of the reference line.
Default value: 0

RefLineEndY (input_control)
integer -> HTuple.long
y coordinate of the endpoint of the reference line.
Default value: 0

RefLineEndX (input_control)
integer -> HTuple.long
x coordinate of the endpoint of the reference line.
Default value: 0

nWidth (input_control)
integer -> HTuple.long
Maximum distance.
Default value: 1

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

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

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


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-2002 MVTec Software GmbH