ClassesClasses | | Operators

select_contours_xldselect_contours_xldSelectContoursXldSelectContoursXld (Operator)

Name

select_contours_xldselect_contours_xldSelectContoursXldSelectContoursXld — Select XLD contours according to several features.

Signature

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

Herror select_contours_xld(const Hobject Contours, Hobject* SelectedContours, const char* Feature, double Min1, double Max1, double Min2, double Max2)

Herror T_select_contours_xld(const Hobject Contours, Hobject* SelectedContours, const Htuple Feature, const Htuple Min1, const Htuple Max1, const Htuple Min2, const Htuple Max2)

void SelectContoursXld(const HObject& Contours, HObject* SelectedContours, const HTuple& Feature, const HTuple& Min1, const HTuple& Max1, const HTuple& Min2, const HTuple& Max2)

HXLDCont HXLDCont::SelectContoursXld(const HString& Feature, double Min1, double Max1, double Min2, double Max2) const

HXLDCont HXLDCont::SelectContoursXld(const char* Feature, double Min1, double Max1, double Min2, double Max2) const

static void HOperatorSet.SelectContoursXld(HObject contours, out HObject selectedContours, HTuple feature, HTuple min1, HTuple max1, HTuple min2, HTuple max2)

HXLDCont HXLDCont.SelectContoursXld(string feature, double min1, double max1, double min2, double max2)

Description

select_contours_xldselect_contours_xldSelectContoursXldSelectContoursXldSelectContoursXld selects XLD contours from the input contours ContoursContoursContoursContourscontours according to the following features (parameter FeatureFeatureFeatureFeaturefeature):

'contour_length'"contour_length""contour_length""contour_length""contour_length":

all contours whose length is smaller than Min1Min1Min1Min1min1 or larger than Max1Max1Max1Max1max1 are not returned (Min2Min2Min2Min2min2 and Max2Max2Max2Max2max2 have no influence here).

'maximum_extent'"maximum_extent""maximum_extent""maximum_extent""maximum_extent":

all contours whose maximum extent (as measured by their eight extremal points in row and column direction, according to Haralick and Shapiro: Computer and Robot Vision, Addison-Wesley 1992, chapter 3.2) is smaller than Min1Min1Min1Min1min1 or larger than Max1Max1Max1Max1max1 are not returned (Min2Min2Min2Min2min2 and Max2Max2Max2Max2max2 have no influence here).

'direction'"direction""direction""direction""direction":

only contours for which the direction of the regression line is between Min1Min1Min1Min1min1 and Max1Max1Max1Max1max1 (in radians, counter-clockwise) are returned. Min1Min1Min1Min1min1 and Max1Max1Max1Max1max1 are mapped to the range of [0,2*PI[. (Min2Min2Min2Min2min2 and Max2Max2Max2Max2max2 have no influence here).

'curvature'"curvature""curvature""curvature""curvature":

only contours for which the mean distance from the regression line lies between Min1Min1Min1Min1min1 and Max1Max1Max1Max1max1, and for which the standard deviation of the distances is between Min2Min2Min2Min2min2 and Max2Max2Max2Max2max2 are returned.

'closed'"closed""closed""closed""closed":

only contours for which the distance between their start point and their end point is less or equal Max1Max1Max1Max1max1 pixels are returned. (Min1Min1Min1Min1min1, Min2Min2Min2Min2min2 and Max2Max2Max2Max2max2 have no influence here.)

'open'"open""open""open""open":

only contours for which the distance between their start point and their end point is greater than Min1Min1Min1Min1min1 pixels are returned. (Max1Max1Max1Max1max1, Min2Min2Min2Min2min2 and Max2Max2Max2Max2max2 have no influence here).

If Min1Min1Min1Min1min1 = Max1Max1Max1Max1max1 = 0 or Min2Min2Min2Min2min2 = Max2Max2Max2Max2max2 = 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_xldselect_contours_xldSelectContoursXldSelectContoursXldSelectContoursXld according to 'direction' or 'curvature', the parameters of the regression lines to the contours must be calculated with regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXld. If this has not been done, select_contours_xldselect_contours_xldSelectContoursXldSelectContoursXldSelectContoursXld calls regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXld internally with the parameters Mode = 'no'"no""no""no""no" and Iterations = 1. If a different mode should be used, regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXld must be called explicitly.

Execution Information

Parameters

ContoursContoursContoursContourscontours (input_object)  xld_cont-array objectHXLDContHXLDContHobject

Input XLD contours.

SelectedContoursSelectedContoursSelectedContoursSelectedContoursselectedContours (output_object)  xld_cont-array objectHXLDContHXLDContHobject *

Output XLD contours.

FeatureFeatureFeatureFeaturefeature (input_control)  string HTupleHTupleHtuple (string) (string) (HString) (char*)

Feature to select contours with.

Default value: 'contour_length' "contour_length" "contour_length" "contour_length" "contour_length"

List of values: 'closed'"closed""closed""closed""closed", 'contour_length'"contour_length""contour_length""contour_length""contour_length", 'curvature'"curvature""curvature""curvature""curvature", 'direction'"direction""direction""direction""direction", 'maximum_extent'"maximum_extent""maximum_extent""maximum_extent""maximum_extent", 'open'"open""open""open""open"

Min1Min1Min1Min1min1 (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Lower threshold.

Default value: 0.5

Max1Max1Max1Max1max1 (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Upper threshold.

Default value: 200.0

Min2Min2Min2Min2min2 (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Lower threshold.

Default value: -0.5

Max2Max2Max2Max2max2 (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Upper threshold.

Default value: 0.5

Possible Predecessors

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXld

See also

get_contour_xldget_contour_xldGetContourXldGetContourXldGetContourXld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXld, gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXld, lines_gausslines_gaussLinesGaussLinesGaussLinesGauss, lines_facetlines_facetLinesFacetLinesFacetLinesFacet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix, get_regress_params_xldget_regress_params_xldGetRegressParamsXldGetRegressParamsXldGetRegressParamsXld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXld

References

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

Module

Foundation


ClassesClasses | | Operators