elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld elliptic_axis_xld (Operator)
Name
elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld elliptic_axis_xld — Parameter der äquivalenten Ellipse von Konturen oder Polygonen.
Signatur
Herror elliptic_axis_xld (const Hobject XLD , double* Ra , double* Rb , double* Phi )
Herror T_elliptic_axis_xld (const Hobject XLD , Htuple* Ra , Htuple* Rb , Htuple* Phi )
void EllipticAxisXld (const HObject& XLD , HTuple* Ra , HTuple* Rb , HTuple* Phi )
HTuple HXLD ::EllipticAxisXld (HTuple* Rb , HTuple* Phi ) const
double HXLD ::EllipticAxisXld (double* Rb , double* Phi ) const
def elliptic_axis_xld (xld : HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float]]
def elliptic_axis_xld_s (xld : HObject) -> Tuple[float, float, float]
Beschreibung
elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld EllipticAxisXld elliptic_axis_xld berechnet die Radien und die Orientierungen
der Ellipsen, die die gleiche Orientierung und das gleiche
Seitenverhältnis wie die jeweiligen Eingabekonturen bzw. Eingabepolygone
haben.
Es wird die Länge der Hauptachse Ra Ra Ra Ra ra ra und der Nebenachse
Rb Rb Rb Rb rb rb sowie die Orientierung der Hauptachse bezüglich der
Horizontalen (Phi Phi Phi Phi phi phi ) bestimmt. Der Winkel wird dabei im
Bogenmaß angegeben. Es wird vorausgesetzt, dass die Konturen bzw. die
Polygone geschlossen sind. Ist das nicht der Fall, werden sie künstlich
geschlossen.
Berechnung:
Seien die Momente
,
und
normiert auf die Fläche gegeben (siehe moments_xld moments_xld MomentsXld MomentsXld MomentsXld moments_xld ), dann
berechnen sich die Radien Ra Ra Ra Ra ra ra und Rb Rb Rb Rb rb rb zu:
Die Orientierung Phi Phi Phi Phi phi phi ist definiert durch:
Es ist zu beachten, dass elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld EllipticAxisXld elliptic_axis_xld nur dann
sinnvolle Ergebnisse liefert, falls die Kontur oder das Polygon eine
Fläche in der Ebene einschließt. Insbesondere darf sich die Kontur
oder das Polygon nicht selbst schneiden. Dies ist insbesondere dann
zu beachten, wenn offene Konturen und Polygone übergeben werden, da
diese automatisch geschlossen werden, was dazu führen kann, dass sich
die Kontur oder das Polygon selbst schneidet. Ob sich die Konturen
oder Polygone selbst schneiden, kann leicht mit
test_self_intersection_xld test_self_intersection_xld TestSelfIntersectionXld TestSelfIntersectionXld TestSelfIntersectionXld test_self_intersection_xld überprüft werden. Falls sich die
Kontur oder das Polygon selbst schneidet, können sinnvolle Werte
für die Ellipsenparameter mit elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld
berechnet werden.
Wird mehr als eine Kontur oder ein Polygon übergeben, dann werden
die Ergebnisse in Tupeln in der Reihenfolge ihrer entsprechenden Konturen
bzw. Polygone in XLD XLD XLD XLD XLD xld abgespeichert.
Ausführungsinformationen
Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
Automatisch parallelisiert auf Tupelebene.
Parameter
XLD XLD XLD XLD XLD xld (input_object) xld(-array) → object HXLD HObject HXLD Hobject
Zu untersuchende Konturen oder Polygone.
Ra Ra Ra Ra ra ra (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Hauptradius.
Zusicherung: Ra >= 0.0
Rb Rb Rb Rb rb rb (output_control) real(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Nebenradius.
Zusicherung: Rb >= 0.0 && Rb <= Ra
Phi Phi Phi Phi phi phi (output_control) angle.rad(-array) → HTuple Sequence[float] HTuple Htuple (real) (double ) (double ) (double )
Winkel zwischen Hauptachse und x-Achse
(Bogenmaß).
Zusicherung: - pi / 2 < Phi && Phi <= pi / 2
Komplexität
Sei N die Anzahl der Punkte in der Kontur bzw. im Polygon, dann beträgt
die Laufzeitkomplexität O(N).
Ergebnis
elliptic_axis_xld elliptic_axis_xld EllipticAxisXld EllipticAxisXld EllipticAxisXld elliptic_axis_xld liefert den Wert TRUE, falls die Eingabe
nicht leer ist. Das Verhalten bei leerer Eingabe lässt sich
mittels set_system(::'no_object_result',<Result>:) set_system("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) SetSystem("no_object_result",<Result>) set_system("no_object_result",<Result>)
festlegen. Gegebenenfalls wird eine Fehlerbehandlung
durchgeführt.
Vorgänger
gen_contours_skeleton_xld gen_contours_skeleton_xld GenContoursSkeletonXld GenContoursSkeletonXld GenContoursSkeletonXld gen_contours_skeleton_xld ,
edges_sub_pix edges_sub_pix EdgesSubPix EdgesSubPix EdgesSubPix edges_sub_pix ,
threshold_sub_pix threshold_sub_pix ThresholdSubPix ThresholdSubPix ThresholdSubPix threshold_sub_pix ,
gen_contour_polygon_xld gen_contour_polygon_xld GenContourPolygonXld GenContourPolygonXld GenContourPolygonXld gen_contour_polygon_xld ,
test_self_intersection_xld test_self_intersection_xld TestSelfIntersectionXld TestSelfIntersectionXld TestSelfIntersectionXld test_self_intersection_xld
Nachfolger
area_center_xld area_center_xld AreaCenterXld AreaCenterXld AreaCenterXld area_center_xld ,
gen_ellipse_contour_xld gen_ellipse_contour_xld GenEllipseContourXld GenEllipseContourXld GenEllipseContourXld gen_ellipse_contour_xld
Alternativen
elliptic_axis_points_xld elliptic_axis_points_xld EllipticAxisPointsXld EllipticAxisPointsXld EllipticAxisPointsXld elliptic_axis_points_xld ,
smallest_rectangle2 smallest_rectangle2 SmallestRectangle2 SmallestRectangle2 SmallestRectangle2 smallest_rectangle2
Siehe auch
moments_xld moments_xld MomentsXld MomentsXld MomentsXld moments_xld ,
smallest_circle_xld smallest_circle_xld SmallestCircleXld SmallestCircleXld SmallestCircleXld smallest_circle_xld ,
smallest_rectangle1_xld smallest_rectangle1_xld SmallestRectangle1Xld SmallestRectangle1Xld SmallestRectangle1Xld smallest_rectangle1_xld ,
smallest_rectangle2_xld smallest_rectangle2_xld SmallestRectangle2Xld SmallestRectangle2Xld SmallestRectangle2Xld smallest_rectangle2_xld ,
shape_trans_xld shape_trans_xld ShapeTransXld ShapeTransXld ShapeTransXld shape_trans_xld
Literatur
R. Haralick, L. Shapiro
„Computer and Robot Vision“
Addison-Wesley, 1992, pp. 73-75
Modul
Foundation