height_width_ratioheight_width_ratioHeightWidthRatioHeightWidthRatio (Operator)

Name

height_width_ratioheight_width_ratioHeightWidthRatioHeightWidthRatio — Ermitteln der Breite, Höhe und des Seitenverhältnisses des umschließenden Rechtecks parallel zu den Koordinatenachsen.

Signatur

height_width_ratio(Regions : : : Height, Width, Ratio)

Herror height_width_ratio(const Hobject Regions, Hlong* Height, Hlong* Width, double* Ratio)

Herror T_height_width_ratio(const Hobject Regions, Htuple* Height, Htuple* Width, Htuple* Ratio)

void HeightWidthRatio(const HObject& Regions, HTuple* Height, HTuple* Width, HTuple* Ratio)

HTuple HRegion::HeightWidthRatio(HTuple* Width, HTuple* Ratio) const

Hlong HRegion::HeightWidthRatio(Hlong* Width, double* Ratio) const

static void HOperatorSet.HeightWidthRatio(HObject regions, out HTuple height, out HTuple width, out HTuple ratio)

HTuple HRegion.HeightWidthRatio(out HTuple width, out HTuple ratio)

int HRegion.HeightWidthRatio(out int width, out double ratio)

Beschreibung

height_width_ratioheight_width_ratioHeightWidthRatioHeightWidthRatioHeightWidthRatio berechnet das umschließende Rechteck aller Eingaberegionen (parallel zu den Koordinatenachsen). Das umschließende Rechteck wird durch die Koordinaten der Eckpunkte (Row1Row1Row1Row1row1,Column1Column1Column1Column1column1,Row2Row2Row2Row2row2,Column2Column2Column2Column2column2) beschrieben (siehe smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1). Basierend auf diesen Werten werden die Breite, Höhe und das Seitenverhältnis wie folgt berechnet:

Wird mehr als eine Region in RegionsRegionsRegionsRegionsregions übergeben, dann werden die Ergebnisse in Tupeln in der Reihenfolge ihrer entsprechenden Regionen in RegionsRegionsRegionsRegionsregions abgespeichert. Bei leeren Regionen haben alle Parameter den Wert 0, soweit kein anderes Verhalten eingestellt wurde (siehe set_systemset_systemSetSystemSetSystemSetSystem).

Ausführungsinformationen

Parameter

RegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHobject

Zu untersuchende Regionen.

HeightHeightHeightHeightheight (output_control)  extent.y(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Höhe des umschließenden Rechtecks der Region.

WidthWidthWidthWidthwidth (output_control)  extent.x(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Breite des umschließenden Rechtecks der Region.

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

Seitenverhältnis des umschließenden Rechtecks der Region.

Komplexität

Sei F die Fläche einer Region, dann beträgt die Laufzeitkomplexität im Mittel O(sqrt(F)).

Ergebnis

height_width_ratioheight_width_ratioHeightWidthRatioHeightWidthRatioHeightWidthRatio liefert den Wert 2 (H_MSG_TRUE), falls die Eingabe nicht leer ist. Das Verhalten bei leerer Eingabe (keine Eingaberegionen vorhanden) 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. Das Verhalten bei einer leeren Region (Region ist die leere Menge) wird mit set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>) bestimmt. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionConnectionConnection, runlength_featuresrunlength_featuresRunlengthFeaturesRunlengthFeaturesRunlengthFeatures

Alternativen

smallest_rectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1SmallestRectangle1, smallest_rectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2SmallestRectangle2, region_featuresregion_featuresRegionFeaturesRegionFeaturesRegionFeatures

Siehe auch

select_shapeselect_shapeSelectShapeSelectShapeSelectShape, smallest_circlesmallest_circleSmallestCircleSmallestCircleSmallestCircle, elliptic_axiselliptic_axisEllipticAxisEllipticAxisEllipticAxis, area_centerarea_centerAreaCenterAreaCenterAreaCenter

Modul

Foundation