Name
elliptic_axis_xldelliptic_axis_xldEllipticAxisXldelliptic_axis_xldEllipticAxisXldEllipticAxisXld — Parameter der äquivalenten Ellipse von Konturen oder Polygonen.
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)
Herror elliptic_axis_xld(Hobject XLD, double* Ra, double* Rb, double* Phi)
Herror elliptic_axis_xld(Hobject XLD, HTuple* Ra, HTuple* Rb, HTuple* Phi)
double HXLD::EllipticAxisXld(double* Rb, double* Phi) const
HTuple HXLDArray::EllipticAxisXld(HTuple* Rb, HTuple* Phi) const
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
elliptic_axis_xldelliptic_axis_xldEllipticAxisXldelliptic_axis_xldEllipticAxisXldEllipticAxisXld berechnet die Radien und die Orientierungen
der Ellipsen, die die gleiche Orientierung und das gleiche
Seitenverhältnis wie die jeweiligen Eingabekonturn bzw. Eingabepolygone
haben.
Es wird die Länge der Hauptachse RaRaRaRaRara und der Nebenachse
RbRbRbRbRbrb sowie die Orientierung der Hauptachse bezüglich der
Horizontalen (PhiPhiPhiPhiPhiphi) 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 M20, M02 und M11
normiert auf die Fläche gegeben (siehe moments_xldmoments_xldMomentsXldmoments_xldMomentsXldMomentsXld), dann
berechnen sich
die Radien RaRaRaRaRara und RbRbRbRbRbrb zu:
RaRaRaRaRara = sqrt(8.0*(M20+M02+sqrt((M20-M02)^2+4.0*M11^2)))/2.0
RbRbRbRbRbrb = sqrt(8.0*(M20+M02-sqrt((M20-M02)^2+4.0*M11^2)))/2.0
Die Orientierung PhiPhiPhiPhiPhiphi ist definiert durch:
PhiPhiPhiPhiPhiphi = -0.5 * atan2(2.0 * M11,M02 - M20)
Es ist zu beachten, dass elliptic_axis_xldelliptic_axis_xldEllipticAxisXldelliptic_axis_xldEllipticAxisXldEllipticAxisXld 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_xldtest_self_intersection_xldTestSelfIntersectionXldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXld überprüft werden. Falls sich die
Kontur oder das Polygon selbst schneidet, können sinnvolle Werte
für die Ellipsenparameter mit elliptic_axis_points_xldelliptic_axis_points_xldEllipticAxisPointsXldelliptic_axis_points_xldEllipticAxisPointsXldEllipticAxisPointsXld
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 XLDXLDXLDXLDXLDXLD abgespeichert.
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Automatisch parallelisiert auf Tupelebene.
Zu untersuchende Konturen oder Polygone.
RaRaRaRaRara (output_control) real(-array) → HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)
Hauptradius.
Zusicherung: Ra >= 0.0
RbRbRbRbRbrb (output_control) real(-array) → HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)
Nebenradius.
Zusicherung: Rb >= 0.0 && Rb <= Ra
Winkel zwischen Hauptachse und x-Achse
(Bogenmaß).
Zusicherung: - pi / 2 < Phi && Phi <= pi / 2
Sei N die Anzahl der Punkte in der Kontur bzw. im Polygon, dann beträgt
die Laufzeitkomplexität O(N).
elliptic_axis_xldelliptic_axis_xldEllipticAxisXldelliptic_axis_xldEllipticAxisXldEllipticAxisXld liefert den Wert 2 (H_MSG_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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)
festlegen. Gegebenenfalls wird eine Fehlerbehandlung
durchgeführt.
gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld,
edges_sub_pixedges_sub_pixEdgesSubPixedges_sub_pixEdgesSubPixEdgesSubPix,
threshold_sub_pixthreshold_sub_pixThresholdSubPixthreshold_sub_pixThresholdSubPixThresholdSubPix,
gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXld,
test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXld
area_center_xldarea_center_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld,
gen_ellipse_contour_xldgen_ellipse_contour_xldGenEllipseContourXldgen_ellipse_contour_xldGenEllipseContourXldGenEllipseContourXld
elliptic_axis_points_xldelliptic_axis_points_xldEllipticAxisPointsXldelliptic_axis_points_xldEllipticAxisPointsXldEllipticAxisPointsXld,
smallest_rectangle2smallest_rectangle2SmallestRectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2
moments_xldmoments_xldMomentsXldmoments_xldMomentsXldMomentsXld,
smallest_circle_xldsmallest_circle_xldSmallestCircleXldsmallest_circle_xldSmallestCircleXldSmallestCircleXld,
smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1Xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1Xld,
smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2Xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2Xld,
shape_trans_xldshape_trans_xldShapeTransXldshape_trans_xldShapeTransXldShapeTransXld
R. Haralick, L. Shapiro
„Computer and Robot Vision“
Addison-Wesley, 1992, pp. 73-75
Foundation