smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld (Operator)

Name

smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld — Kleinstes umschließendes Rechteck mit beliebiger Orientierung von Konturen oder Polygonen.

Signatur

smallest_rectangle2_xld(XLD : : : Row, Column, Phi, Length1, Length2)

Herror smallest_rectangle2_xld(const Hobject XLD, double* Row, double* Column, double* Phi, double* Length1, double* Length2)

Herror T_smallest_rectangle2_xld(const Hobject XLD, Htuple* Row, Htuple* Column, Htuple* Phi, Htuple* Length1, Htuple* Length2)

void SmallestRectangle2Xld(const HObject& XLD, HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Length1, HTuple* Length2)

void HXLD::SmallestRectangle2Xld(HTuple* Row, HTuple* Column, HTuple* Phi, HTuple* Length1, HTuple* Length2) const

void HXLD::SmallestRectangle2Xld(double* Row, double* Column, double* Phi, double* Length1, double* Length2) const

static void HOperatorSet.SmallestRectangle2Xld(HObject XLD, out HTuple row, out HTuple column, out HTuple phi, out HTuple length1, out HTuple length2)

void HXLD.SmallestRectangle2Xld(out HTuple row, out HTuple column, out HTuple phi, out HTuple length1, out HTuple length2)

void HXLD.SmallestRectangle2Xld(out double row, out double column, out double phi, out double length1, out double length2)

def smallest_rectangle2_xld(xld: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

def smallest_rectangle2_xld_s(xld: HObject) -> Tuple[float, float, float, float, float]

Beschreibung

smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_xld bestimmt das kleinste umschließende Rechteck für jede Eingabekontur bzw. jedes Eingabepolygon, also das Rechteck mit dem kleinsten Flächeninhalt unter allen Rechtecken, die die Kontur enthalten. Für dieses Rechteck werden der Mittelpunkt, der Neigungswinkel und die beiden Halbmesser berechnet.

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. Bei leerer Kontur haben alle Parameter den Wert 0.0, soweit kein anderes Verhalten eingestellt wurde (siehe set_systemset_systemSetSystemSetSystemSetSystemset_system).

Ausführungsinformationen

Parameter

XLDXLDXLDXLDXLDxld (input_object)  xld(-array) objectHXLDHObjectHXLDHobject

Zu untersuchende Konturen oder Polygone.

RowRowRowRowrowrow (output_control)  rectangle2.center.y(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Zeilenkoordinate des Mittelpunktes des umschließenden Rechtecks.

ColumnColumnColumnColumncolumncolumn (output_control)  rectangle2.center.x(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Spaltenkoordinate des Mittelpunktes des umschließenden Rechtecks.

PhiPhiPhiPhiphiphi (output_control)  rectangle2.angle.rad(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Orientierung des umschließenden Rechtecks (Bogenmaß)

Zusicherung: - pi / 2 < Phi && Phi <= pi / 2

Length1Length1Length1Length1length1length_1 (output_control)  rectangle2.hwidth(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Erster Halbmesser (halbe Länge) des umschließenden Rechtecks.

Zusicherung: Length1 >= 0.0

Length2Length2Length2Length2length2length_2 (output_control)  rectangle2.hheight(-array) HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Zweiter Halbmesser (halbe Breite) des umschließenden Rechtecks.

Zusicherung: Length2 >= 0.0 && Length2 <= Length1

Komplexität

Seien N die Anzahl der Punkte in der Kontur und C die Anzahl der Punkte der entsprechenden konvexen Hülle, dann beträgt die Laufzeitkomplexität O(N*ln(N)+C^2).

Ergebnis

smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xldsmallest_rectangle2_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_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXldgen_contours_skeleton_xld, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPixedges_sub_pix, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPixthreshold_sub_pix, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXldgen_contour_polygon_xld

Nachfolger

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXldgen_polygons_xld

Alternativen

smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1, shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldShapeTransXldshape_trans_xld

Siehe auch

smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1smallest_rectangle1, smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCirclesmallest_circle, elliptic_axis_xldelliptic_axis_xldEllipticAxisXldEllipticAxisXldEllipticAxisXldelliptic_axis_xld

Modul

Foundation