select_cont_xld ( Contours : SelectedContours : Feature, Min1, Max1, Min2, Max2 : )

Select XLD contours according to several features.

select_cont_xld selects XLD contours from the input contours Contours according to the following features (parameter Feature):

- 'length': 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.
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 the contour parameters can be returned by cont_info_xld, the parameters of the regression line to the contour must be calculated by calling regress_cont_xld.


Parameters

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

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

Feature (input_control)
string -> string
Feature to selecto contours with.
Default value: 'length'
List of values: 'length', 'direction', 'curvature'

Min1 (input_control)
real -> real
Lower threshold.
Default value: 0.5

Max1 (input_control)
real -> real
Upper threshold.
Default value: 200.0

Min2 (input_control)
real -> real
Lower threshold.
Default value: -0.5

Max2 (input_control)
real -> real
Upper threshold.
Default value: 0.5


Possible Predecessors

regress_cont_xld


See also

get_contour_xld, get_cont_attrib_xld, gen_contour_xld, gen_contour2_xld, lines_gauss, lines_facet, edges_sub_pix, cont_info_xld


References

R. Haralick, L. Shapiro: "Computer and Robot Vision" Vol. 1; Kapitel 3.2, Addison-Wesley 1992



Copyright © 1996-1997 MVTec Software GmbH