height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXld (Operator)

Name

height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXld — Ermitteln der Breite, Höhe und des Seitenverhältnisses des umschließenden Rechtecks parallel zu den Koordinatenachsen von Konturen oder Polygonen.

Signatur

height_width_ratio_xld(XLD : : : Height, Width, Ratio)

Herror height_width_ratio_xld(const Hobject XLD, double* Height, double* Width, double* Ratio)

Herror T_height_width_ratio_xld(const Hobject XLD, Htuple* Height, Htuple* Width, Htuple* Ratio)

void HeightWidthRatioXld(const HObject& XLD, HTuple* Height, HTuple* Width, HTuple* Ratio)

HTuple HXLD::HeightWidthRatioXld(HTuple* Width, HTuple* Ratio) const

double HXLD::HeightWidthRatioXld(double* Width, double* Ratio) const

static void HOperatorSet.HeightWidthRatioXld(HObject XLD, out HTuple height, out HTuple width, out HTuple ratio)

HTuple HXLD.HeightWidthRatioXld(out HTuple width, out HTuple ratio)

double HXLD.HeightWidthRatioXld(out double width, out double ratio)

Beschreibung

height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXldHeightWidthRatioXld berechnet das umschließende Rechteck (parallel zu den Koordinatenachsen) für jede Eingabekontur bzw. jedes Eingabepolygon. Das umschließende Rechteck wird durch die Koordinaten der Eckpunkte (Row1Row1Row1Row1row1,Column1Column1Column1Column1column1,Row2Row2Row2Row2row2,Column2Column2Column2Column2column2) beschrieben. Basierend auf diesen Werten werden die Breite, Höhe und das Seitenverhältnis wie folgt 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 XLDXLDXLDXLDXLD abgespeichert. Bei leerer Kontur haben alle Parameter den Wert 0, soweit kein anderes Verhalten eingestellt wurde (siehe set_systemset_systemSetSystemSetSystemSetSystem).

Achtung

Falls , wird RatioRatioRatioRatioratio auf DBL_MAX (1.797e308) gesetzt.

Ausführungsinformationen

Parameter

XLDXLDXLDXLDXLD (input_object)  xld(-array) objectHXLDHXLDHobject

Zu untersuchende Konturen oder Polygone.

HeightHeightHeightHeightheight (output_control)  extent.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Höhe des umschließenden Rechtecks.

WidthWidthWidthWidthwidth (output_control)  extent.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Breite des umschließenden Rechtecks.

RatioRatioRatioRatioratio (output_control)  real(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Seitenverhältnis des umschließenden Rechtecks.

Komplexität

Sei N die Anzahl der Punkte in der Kontur, dann beträgt die Laufzeitkomplexität O(N).

Ergebnis

height_width_ratio_xldheight_width_ratio_xldHeightWidthRatioXldHeightWidthRatioXldHeightWidthRatioXld 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>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXld, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPix, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXld

Nachfolger

gen_polygons_xldgen_polygons_xldGenPolygonsXldGenPolygonsXldGenPolygonsXld

Alternativen

smallest_rectangle1_xldsmallest_rectangle1_xldSmallestRectangle1XldSmallestRectangle1XldSmallestRectangle1Xld, smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xld, shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldShapeTransXld

Siehe auch

shape_trans_xldshape_trans_xldShapeTransXldShapeTransXldShapeTransXld, smallest_circle_xldsmallest_circle_xldSmallestCircleXldSmallestCircleXldSmallestCircleXld, elliptic_axis_xldelliptic_axis_xldEllipticAxisXldEllipticAxisXldEllipticAxisXld, area_center_xldarea_center_xldAreaCenterXldAreaCenterXldAreaCenterXld

Modul

Foundation