Herror ::select_contours_xld (
Hobject Contours,
Hobject *SelectedContours,
const HTuple &Feature,
const HTuple &Min1,
const HTuple &Max1,
const HTuple &Min2,
const HTuple &Max2
)
HXLDContArray HXLDContArray::SelectContoursXld (
const HTuple &Feature,
const HTuple &Min1,
const HTuple &Max1,
const HTuple &Min2,
const HTuple &Max2
) const
Select XLD contours according to several features.
::select_contours_xld selects XLD contours from the input
contours Contours according to the following features
(parameter Feature):
- 'contour_length': all contours whose length is smaller than Min1
or larger than Max1 are not returned (Min2 and Max2 have no
influence here).
- 'maximum_extent': all contours whose maximum extent (as measured
by their eight extremal points in row and column direction,
according to Haralick und Shapiro: Computer and Robot Vision,
Addison-Wesley 1992, chapter 3.2) is smaller than Min1 or larger
than Max1 are not returned (Min2 and Max2 have no influence here).
- 'direction': only contours for which the direction of the
regression line is between Min1 and Max1 (in radians,
counter-clockwise) are returned (Min2 and Max2 have no influence
here).
- 'curvature': only contours for which the mean distance to the
regression line lies between Min1 and Max1, and for which the
standard deviation of the distances is between Min2 and Max2 are
returned.
- 'closed': only contours for which the distance between their
start point and their end point is less or equal
Max2 pixels are returned.
If Min1 = Max1 = 0 or Min2 =
Max2 = 0 is used for the selection according to
curvature, the respective feature has no influence on the
selection.
Attention
Before contour can be filtered by ::select_contours_xld
according to 'direction' or 'curvature', the parameters of the
regression lines to the contours must be calculated by calling
::regress_contours_xld.
Parameters
Contours (input_object)
|
xld_cont-array -> Hobject: HXLDContArray
|
|
Input XLD contours. |
SelectedContours (output_object)
|
xld_cont-array -> Hobject * : HXLDContArray
|
|
Output XLD contours. |
Feature (input_control)
|
string -> HTuple.char *
|
|
Feature to select contours with. |
|
Default value: 'contour_length' |
|
List of values: 'contour_length', 'maximum_extent', 'direction', 'curvature', 'closed' |
Min1 (input_control)
|
real -> HTuple.double
|
|
Lower threshold. |
|
Default value: 0.5 |
Max1 (input_control)
|
real -> HTuple.double
|
|
Upper threshold. |
|
Default value: 200.0 |
Min2 (input_control)
|
real -> HTuple.double
|
|
Lower threshold. |
|
Default value: -0.5 |
Max2 (input_control)
|
real -> HTuple.double
|
|
Upper threshold. |
|
Default value: 0.5 |
Possible Predecessors
::regress_contours_xld
See also
::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
References
R. Haralick, L. Shapiro: "Computer and Robot Vision" Vol. 1;
Kapitel 3.2, Addison-Wesley 1992
Module
Sub-pixel operators
Copyright © 1996-2002 MVTec Software GmbH