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 Max1 pixels are returned. - 'open': only contours for which the distance between their start point and their end point is greater than Max1 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.
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.
|
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 select contours with. | |
| Default value: 'contour_length' | |
| List of values: 'contour_length', 'maximum_extent', 'direction', 'curvature', 'closed', 'open' | |
|
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 | |
select_contours_xld is reentrant and processed without parallelization.
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
R. Haralick, L. Shapiro: "Computer and Robot Vision" Vol. 1; Kapitel 3.2, Addison-Wesley 1992
Sub-pixel operators