union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldunion_straight_contours_xld (Operator)

Name

union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldunion_straight_contours_xld — 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)

def union_straight_contours_xld(contours: HObject, max_dist: float, max_diff: float, percent: float, mode: str, iterations: Union[int, str]) -> HObject

Beschreibung

Mit union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXldunion_straight_contours_xld werden die Konturen ContoursContoursContoursContourscontourscontours verglichen und unter gewissen Voraussetzungen vereinigt. In einem Iterationsschritt werden maximal zwei Konturen, die die entsprechenden Voraussetzungen erfüllen, vereinigt. Mit dem Parameter IterationsIterationsIterationsIterationsiterationsiterations 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 MaxDistMaxDistMaxDistMaxDistmaxDistmax_dist ist und wenn ihre Richtungsdifferenz (bzgl. der zugehörigen optimalen Regressionsgeraden) kleiner als MaxDiffMaxDiffMaxDiffMaxDiffmaxDiffmax_diff (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 PercentPercentPercentPercentpercentpercent beeinflusst werden, indem die prozentuale Überschreitung des angegebenen Grenzwertes gegen die prozentuale Unterschreitung des anderen Grenzwertes angerechnet wird. Dabei wird der Endpunktabstand mit PercentPercentPercentPercentpercentpercent, die Richtungsdifferenz mit 100 - PercentPercentPercentPercentpercentpercent 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 MaxDistMaxDistMaxDistMaxDistmaxDistmax_dist = 4.0 und MaxDiffMaxDiffMaxDiffMaxDiffmaxDiffmax_diff = 0.625), so weichen beide Werte von den Grenzwerten um 25% ab. Durch die Wahl von PercentPercentPercentPercentpercentpercent = 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 PercentPercentPercentPercentpercentpercent = 40% gewählt würde, würden die Konturen vereinigt werden.

Bei PercentPercentPercentPercentpercentpercent = 100% geht nur der Endpunktabstand in die Entscheidung ein, bei PercentPercentPercentPercentpercentpercent = 0% geht nur die Richtungsdifferenz in die Entscheidung ein, bei PercentPercentPercentPercentpercentpercent = 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 ModeModeModeModemodemode 'noparallel'"noparallel""noparallel""noparallel""noparallel""noparallel", ansonsten 'paralleltoo'"paralleltoo""paralleltoo""paralleltoo""paralleltoo""paralleltoo" angegeben werden. Für 'every'"every""every""every""every""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_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXldunion_straight_contours_xld vereinigt werden können, müssen die Regressionsgeradenparameter mit regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXldregress_contours_xld berechnet werden.

Außerdem ist zu beachten, dass union_straight_contours_xldunion_straight_contours_xldUnionStraightContoursXldUnionStraightContoursXldUnionStraightContoursXldunion_straight_contours_xld 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_gaussLinesGaussLinesGaussLinesGausslines_gauss und lines_facetlines_facetLinesFacetLinesFacetLinesFacetlines_facet). 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_xldQueryContourAttribsXldQueryContourAttribsXldQueryContourAttribsXldquery_contour_attribs_xld abgefragt werden.

Ausführungsinformationen

Parameter

ContoursContoursContoursContourscontourscontours (input_object)  xld_cont-array objectHXLDContHObjectHXLDContHobject

Eingabe-Konturen.

UnionContoursUnionContoursUnionContoursUnionContoursunionContoursunion_contours (output_object)  xld_cont-array objectHXLDContHObjectHXLDContHobject *

Ausgabe-Konturen.

MaxDistMaxDistMaxDistMaxDistmaxDistmax_dist (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximaler Abstand der Endpunkte.

Defaultwert: 5.0

MaxDiffMaxDiffMaxDiffMaxDiffmaxDiffmax_diff (input_control)  angle.rad HTuplefloatHTupleHtuple (real) (double) (double) (double)

Maximale Richtungsdifferenz.

Defaultwert: 0.5

PercentPercentPercentPercentpercentpercent (input_control)  real HTuplefloatHTupleHtuple (real) (double) (double) (double)

Gewichtungsfaktor für die zwei Selektionskriterien.

Defaultwert: 50.0

ModeModeModeModemodemode (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Berücksichtigung paralleler Konturen.

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

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

IterationsIterationsIterationsIterationsiterationsiterations (input_control)  string HTupleUnion[int, str]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)

Anzahl Iterationen oder 'maximum'.

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

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

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

Minimale Schrittweite: 1

Empfohlene Schrittweite: 1

Vorgänger

regress_contours_xldregress_contours_xldRegressContoursXldRegressContoursXldRegressContoursXldregress_contours_xld

Alternativen

union_collinear_contours_xldunion_collinear_contours_xldUnionCollinearContoursXldUnionCollinearContoursXldUnionCollinearContoursXldunion_collinear_contours_xld, union_collinear_contours_ext_xldunion_collinear_contours_ext_xldUnionCollinearContoursExtXldUnionCollinearContoursExtXldUnionCollinearContoursExtXldunion_collinear_contours_ext_xld, union_cocircular_contours_xldunion_cocircular_contours_xldUnionCocircularContoursXldUnionCocircularContoursXldUnionCocircularContoursXldunion_cocircular_contours_xld, union_cotangential_contours_xldunion_cotangential_contours_xldUnionCotangentialContoursXldUnionCotangentialContoursXldUnionCotangentialContoursXldunion_cotangential_contours_xld, union_adjacent_contours_xldunion_adjacent_contours_xldUnionAdjacentContoursXldUnionAdjacentContoursXldUnionAdjacentContoursXldunion_adjacent_contours_xld

Siehe auch

fit_line_contour_xldfit_line_contour_xldFitLineContourXldFitLineContourXldFitLineContourXldfit_line_contour_xld, get_contour_xldget_contour_xldGetContourXldGetContourXldGetContourXldget_contour_xld, get_contour_attrib_xldget_contour_attrib_xldGetContourAttribXldGetContourAttribXldGetContourAttribXldget_contour_attrib_xld, gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, lines_gausslines_gaussLinesGaussLinesGaussLinesGausslines_gauss, lines_facetlines_facetLinesFacetLinesFacetLinesFacetlines_facet, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, get_regress_params_xldget_regress_params_xldGetRegressParamsXldGetRegressParamsXldGetRegressParamsXldget_regress_params_xld, get_contour_global_attrib_xldget_contour_global_attrib_xldGetContourGlobalAttribXldGetContourGlobalAttribXldGetContourGlobalAttribXldget_contour_global_attrib_xld, query_contour_global_attribs_xldquery_contour_global_attribs_xldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldQueryContourGlobalAttribsXldquery_contour_global_attribs_xld

Modul

Foundation