union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXld (Operator)

Name

union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXld — Vereinigen von benachbarten geraden Konturen mit ähnlicher Richtung.

Signatur

union_straight_contours_xld(Contours : UnionContours : MaxDist, MaxDiff, Percent, Mode, Iterations : )

Herror union_straight_contours_xld(const Hobject Contours, Hobject* UnionContours, double MaxDist, double MaxDiff, double Percent, const char* Mode, const char* Iterations)

Herror T_union_straight_contours_xld(const Hobject Contours, Hobject* UnionContours, const Htuple MaxDist, const Htuple MaxDiff, const Htuple Percent, const Htuple Mode, const Htuple Iterations)

void UnionStraightContoursXld(const HObject& Contours, HObject* UnionContours, const HTuple& MaxDist, const HTuple& MaxDiff, const HTuple& Percent, const HTuple& Mode, const HTuple& Iterations)

HXLDCont HXLDCont::UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const HString& Mode, const HTuple& Iterations) const

HXLDCont HXLDCont::UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const HString& Mode, const HString& Iterations) const

HXLDCont HXLDCont::UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const char* Mode, const char* Iterations) const

HXLDCont HXLDCont::UnionStraightContoursXld(double MaxDist, double MaxDiff, double Percent, const wchar_t* Mode, const wchar_t* Iterations) const   (Nur Windows)

static void HOperatorSet.UnionStraightContoursXld(HObject contours, out HObject unionContours, HTuple maxDist, HTuple maxDiff, HTuple percent, HTuple mode, HTuple iterations)

HXLDCont HXLDCont.UnionStraightContoursXld(double maxDist, double maxDiff, double percent, string mode, HTuple iterations)

HXLDCont HXLDCont.UnionStraightContoursXld(double maxDist, double maxDiff, double percent, string mode, string iterations)

Beschreibung

Mit union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXld werden die Konturen ContoursContoursContoursContourscontours verglichen und unter gewissen Voraussetzungen vereinigt. In einem Iterationsschritt werden maximal zwei Konturen, die die entsprechenden Voraussetzungen erfüllen, vereinigt. Mit dem Parameter IterationsIterationsIterationsIterationsiterations kann gesteuert werden, wie oft dieser Vereinigungsschritt wiederholt wird.

Zwei Konturen werden vereinigt, wenn deren kürzester Endpunktabstand (die Endpunkte sind die Fußpunkte der Lote von den Konturendpunkten auf die optimale Regressionsgerade) kleiner als MaxDistMaxDistMaxDistMaxDistmaxDist ist und wenn ihre Richtungsdifferenz (bzgl. der zugehörigen optimalen Regressionsgeraden) kleiner als MaxDiffMaxDiffMaxDiffMaxDiffmaxDiff (Bogenmaß) ist.

image/svg+xml a
image/svg+xml a

Wenn nur eine der beiden Bedingungen zutrifft, kann die Entscheidung zugunsten einer Vereinigung durch die Gewichtung PercentPercentPercentPercentpercent beeinflusst werden, indem die prozentuale Überschreitung des angegebenen Grenzwertes gegen die prozentuale Unterschreitung des anderen Grenzwertes angerechnet wird. Dabei wird der Endpunktabstand mit PercentPercentPercentPercentpercent, die Richtungsdifferenz mit 100 - PercentPercentPercentPercentpercent bewertet.

Das bedeutet, dass zwei Konturen dann vereinigt werden, wenn sie die folgende Bedingung erfüllen:

Wenn zwei Konturen beispielsweise einen minimalen Endpunktabstand von 5.0 und eine Richtungsdifferenz von 0.5 haben (bei Grenzwerten MaxDistMaxDistMaxDistMaxDistmaxDist = 4.0 und MaxDiffMaxDiffMaxDiffMaxDiffmaxDiff = 0.625), so weichen beide Werte von den Grenzwerten um 25% ab. Durch die Wahl von PercentPercentPercentPercentpercent = 60% fällt nun der große Endpunktabstand stärker ins Gewicht als die geringe Richtungsdifferenz, weshalb die Konturen nicht vereinigt werden. Wenn in diesem Fall PercentPercentPercentPercentpercent = 40% gewählt würde, würden die Konturen vereinigt werden.

Bei PercentPercentPercentPercentpercent = 100% geht nur der Endpunktabstand in die Entscheidung ein, bei PercentPercentPercentPercentpercent = 0% geht nur die Richtungsdifferenz in die Entscheidung ein, bei PercentPercentPercentPercentpercent = 50% sind beide Merkmale gleichberechtigt.

Bei parallel verlaufenden Konturen besteht die Gefahr, dass nebeneinander liegende Konturen vereinigt werden. Soll dieser Effekt verhindert werden, so muss für ModeModeModeModemode 'noparallel', ansonsten 'paralleltoo' angegeben werden. Für 'every' werden die Konturen bedingungslos vereinigt. Alle anderen Parameter haben in diesem Fall keinen Einfluss.

Für jede durch Vereinigung neu entstandene Kontur werden die Regressionsgeradenparameter neu berechnet.

Achtung

Bevor Konturen mit union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXld vereinigt werden können, müssen die Regressionsgeradenparameter mit regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXld berechnet werden.

Außerdem ist zu beachten, dass union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXld keine Konturen vereinigen kann, deren Punkte unterschiedliche Attribute aufweisen. Dieser Fall kann eintreten, wenn Konturen mit verschiedenen Operatoren extrahiert werden (z.B. mit lines_gausslines_gaussLinesGaussLinesGaussLinesGauss und lines_facetlines_facetLinesFacetLinesFacetLinesFacet). Informationen zu den Konturattributen und in welchen Fällen diese definiert werden, können in den jeweiligen Operatorenreferenzen gefunden werden. Die Punktattribute einer Kontur können mit query_contour_attribs_xldquery_contour_attribs_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXld abgefragt werden.

Ausführungsinformationen

Parameter

ContoursContoursContoursContourscontours (input_object)  xld_cont-array objectHXLDContHXLDContHobject

Eingabe-Konturen.

UnionContoursUnionContoursUnionContoursUnionContoursunionContours (output_object)  xld_cont-array objectHXLDContHXLDContHobject *

Ausgabe-Konturen.

MaxDistMaxDistMaxDistMaxDistmaxDist (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Maximaler Abstand der Endpunkte.

Defaultwert: 5.0

MaxDiffMaxDiffMaxDiffMaxDiffmaxDiff (input_control)  angle.rad HTupleHTupleHtuple (real) (double) (double) (double)

Maximale Richtungsdifferenz.

Defaultwert: 0.5

PercentPercentPercentPercentpercent (input_control)  real HTupleHTupleHtuple (real) (double) (double) (double)

Gewichtungsfaktor für die zwei Selektionskriterien.

Defaultwert: 50.0

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

Berücksichtigung paralleler Konturen.

Defaultwert: 'noparallel' "noparallel" "noparallel" "noparallel" "noparallel"

Werteliste: 'every'"every""every""every""every", 'noparallel'"noparallel""noparallel""noparallel""noparallel", 'paralleltoo'"paralleltoo""paralleltoo""paralleltoo""paralleltoo"

IterationsIterationsIterationsIterationsiterations (input_control)  string HTupleHTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Anzahl Iterationen oder 'maximum'.

Defaultwert: 'maximum' "maximum" "maximum" "maximum" "maximum"

Wertevorschläge: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 'maximum'"maximum""maximum""maximum""maximum"

Typischer Wertebereich: 1 ≤ Iterations Iterations Iterations Iterations iterations ≤ 500 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 1

Vorgänger

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXld

Alternativen

union_collinear_contours_xldunion_collinear_contours_xldUnionCollinearContoursXldUnionCollinearContoursXldUnionCollinearContoursXld, union_collinear_contours_ext_xldunion_collinear_contours_ext_xldUnionCollinearContoursExtXldUnionCollinearContoursExtXldUnionCollinearContoursExtXld, union_cocircular_contours_xldunion_cocircular_contours_xldUnionCocircularContoursXldUnionCocircularContoursXldUnionCocircularContoursXld, union_cotangential_contours_xldunion_cotangential_contours_xldUnionCotangentialContoursXldUnionCotangentialContoursXldUnionCotangentialContoursXld, union_adjacent_contours_xldunion_adjacent_contours_xldUnionAdjacentContoursXldUnionAdjacentContoursXldUnionAdjacentContoursXld

Siehe auch

fit_line_contour_xldfit_line_contour_xldFitLineContourXldFitLineContourXldFitLineContourXld, 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

Modul

Foundation