Herror ::local_max_contours_xld (
Hobject Contours,
Hobject Image,
Hobject *LocalMaxContours,
const HTuple &MinPercent,
const HTuple &MinDiff,
const HTuple &Distance
)
HXLDContArray HXLDContArray::LocalMaxContoursXld (
const HImage &Image,
const HTuple &MinPercent,
const HTuple &MinDiff,
const HTuple &Distance
) const
Select XLD contours with a local maximum of gray values.
::local_max_contours_xld selects XLD contours from the
contours passed in Contours, which have a local maximum
in gray values across the direction of the contour. In order to be
selected, at least MinPercent of the contour points must
have a local maximum perpendicular to the direction of the contour.
The contours' direction is determined by fitting a regression line
through five neighboring points of the contour. In order to decide
whether there is a local maximum for a contour point, a gray value
profile that is Distance points wide and perpendicular to the
contour is computed on both sides of the contour. If the gray value
at the countour point is at least MinDiff larger than the
gray value at at least one point on each side of the profile, the
contour point is labeled as a local maximum. The selected contours
are returned in LocalMaxContours.
Parameters
Contours (input_object)
|
xld_cont-array -> Hobject: HXLDContArray
|
|
XLD contours to be examined. |
Image (input_object)
|
image -> Hobject: HImage
|
|
Corresponding gray value image. |
LocalMaxContours (output_object)
|
xld_cont-array -> Hobject * : HXLDContArray
|
|
Selected contours. |
MinPercent (input_control)
|
number -> HTuple.long / double
|
|
Minumum percentage of maximum points. |
|
Default value: 70 |
|
Suggested values: 60, 70, 75, 80, 85, 90, 95 |
|
Restriction: (0.0 <= MinPercent) && (MinPercent <= 100.0) |
MinDiff (input_control)
|
integer -> HTuple.long
|
|
Minimum amount by which the gray value at the
maximum must be larger than in the profile. |
|
Default value: 15 |
|
Suggested values: 5, 8, 10, 12, 15, 20 |
|
Restriction: (0 <= MinDiff) && (MinDiff <= 255) |
Distance (input_control)
|
integer -> HTuple.long
|
|
Maximum width of profile used to check for maxima. |
|
Default value: 4 |
|
Suggested values: 2, 3, 4, 5, 6 |
|
Restriction: Distance >= 1 |
Possible Predecessors
::gen_contours_skeleton_xld,
::lines_gauss,
::lines_facet,
::edges_sub_pix
Possible Successors
::gen_polygons_xld
See also
::smooth_contours_xld
Module
Sub-pixel operators
Copyright © 1996-2002 MVTec Software GmbH