region_to_binregion_to_binRegionToBinRegionToBin (Operator)

Name

region_to_binregion_to_binRegionToBinRegionToBin — Umwandeln von Regionen in ein binäres byte-Bild.

Signatur

region_to_bin(Region : BinImage : ForegroundGray, BackgroundGray, Width, Height : )

Herror region_to_bin(const Hobject Region, Hobject* BinImage, const Hlong ForegroundGray, const Hlong BackgroundGray, const Hlong Width, const Hlong Height)

Herror T_region_to_bin(const Hobject Region, Hobject* BinImage, const Htuple ForegroundGray, const Htuple BackgroundGray, const Htuple Width, const Htuple Height)

void RegionToBin(const HObject& Region, HObject* BinImage, const HTuple& ForegroundGray, const HTuple& BackgroundGray, const HTuple& Width, const HTuple& Height)

HImage HRegion::RegionToBin(Hlong ForegroundGray, Hlong BackgroundGray, Hlong Width, Hlong Height) const

static void HOperatorSet.RegionToBin(HObject region, out HObject binImage, HTuple foregroundGray, HTuple backgroundGray, HTuple width, HTuple height)

HImage HRegion.RegionToBin(int foregroundGray, int backgroundGray, int width, int height)

Beschreibung

region_to_binregion_to_binRegionToBinRegionToBinRegionToBin erzeugt ein 'byte'"byte""byte""byte""byte"-Bild und stellt darin die Eingaberegionen mit dem durch den Eingabe-Steuerparameter ForegroundGrayForegroundGrayForegroundGrayForegroundGrayforegroundGray vorgegebenen Grauwert dar. Regionen, die über die Größe des angegebenen Bildes hinausgehen, werden entsprechend beschnitten. Der Hintergrund wird auf BackgroundGrayBackgroundGrayBackgroundGrayBackgroundGraybackgroundGray gesetzt.

Ausführungsinformationen

Parameter

RegionRegionRegionRegionregion (input_object)  region(-array) objectHRegionHRegionHobject

Enthält die darzustellenden Regionen.

BinImageBinImageBinImageBinImagebinImage (output_object)  image objectHImageHImageHobject * (byte)

Ergebnisbild der Größe Width * Height mit eingetragenen Regionen.

ForegroundGrayForegroundGrayForegroundGrayForegroundGrayforegroundGray (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Grauwert für die Darstellung der Regionen.

Defaultwert: 255

Wertevorschläge: 0, 1, 50, 100, 128, 150, 200, 254, 255

Typischer Wertebereich: 0 ≤ ForegroundGray ForegroundGray ForegroundGray ForegroundGray foregroundGray ≤ 255 (lin)

Empfohlene Schrittweite: 1

BackgroundGrayBackgroundGrayBackgroundGrayBackgroundGraybackgroundGray (input_control)  integer HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Grauwert für die Darstellung des Hintergrunds.

Defaultwert: 0

Wertevorschläge: 0, 1, 50, 100, 128, 150, 200, 254, 255

Typischer Wertebereich: 0 ≤ BackgroundGray BackgroundGray BackgroundGray BackgroundGray backgroundGray ≤ 255 (lin)

Empfohlene Schrittweite: 1

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Breite des zu erstellenden Bildes.

Defaultwert: 512

Wertevorschläge: 256, 512, 1024

Typischer Wertebereich: 1 ≤ Width Width Width Width width ≤ 1024 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 16

Restriktion: Width >= 1

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Höhe des zu erstellenden Bildes.

Defaultwert: 512

Wertevorschläge: 256, 512, 1024

Typischer Wertebereich: 1 ≤ Height Height Height Height height ≤ 1024 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 16

Restriktion: Height >= 1

Komplexität

O(2*HeightHeightHeightHeightheight*WidthWidthWidthWidthwidth).

Ergebnis

region_to_binregion_to_binRegionToBinRegionToBinRegionToBin liefert normalerweise den Wert 2 (H_MSG_TRUE). 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>), das bei leerer Region 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>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThreshold, connectionconnectionConnectionConnectionConnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowing, pouringpouringPouringPouringPouring

Nachfolger

get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayval

Alternativen

region_to_labelregion_to_labelRegionToLabelRegionToLabelRegionToLabel, paint_regionpaint_regionPaintRegionPaintRegionPaintRegion, set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayval

Siehe auch

gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProto, paint_graypaint_grayPaintGrayPaintGrayPaintGray

Modul

Foundation