region_to_binregion_to_binRegionToBinRegionToBinregion_to_bin (Operator)

Name

region_to_binregion_to_binRegionToBinRegionToBinregion_to_bin — 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)

def region_to_bin(region: HObject, foreground_gray: int, background_gray: int, width: int, height: int) -> HObject

Beschreibung

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

Ausführungsinformationen

Parameter

RegionRegionRegionRegionregionregion (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Enthält die darzustellenden Regionen.

BinImageBinImageBinImageBinImagebinImagebin_image (output_object)  image objectHImageHObjectHImageHobject * (byte)

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

ForegroundGrayForegroundGrayForegroundGrayForegroundGrayforegroundGrayforeground_gray (input_control)  integer HTupleintHTupleHtuple (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 foreground_gray ≤ 255 (lin)

Empfohlene Schrittweite: 1

BackgroundGrayBackgroundGrayBackgroundGrayBackgroundGraybackgroundGraybackground_gray (input_control)  integer HTupleintHTupleHtuple (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 background_gray ≤ 255 (lin)

Empfohlene Schrittweite: 1

WidthWidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (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 width ≤ 1024 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 16

Restriktion: Width >= 1

HeightHeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (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 height ≤ 1024 (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 16

Restriktion: Height >= 1

Komplexität

O(2*HeightHeightHeightHeightheightheight*WidthWidthWidthWidthwidthwidth).

Ergebnis

region_to_binregion_to_binRegionToBinRegionToBinRegionToBinregion_to_bin liefert normalerweise den Wert 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>)set_system("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>)set_system("empty_region_result",<Result>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

thresholdthresholdThresholdThresholdThresholdthreshold, connectionconnectionConnectionConnectionConnectionconnection, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, pouringpouringPouringPouringPouringpouring

Nachfolger

get_grayvalget_grayvalGetGrayvalGetGrayvalGetGrayvalget_grayval

Alternativen

region_to_labelregion_to_labelRegionToLabelRegionToLabelRegionToLabelregion_to_label, paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region, set_grayvalset_grayvalSetGrayvalSetGrayvalSetGrayvalset_grayval

Siehe auch

gen_image_protogen_image_protoGenImageProtoGenImageProtoGenImageProtogen_image_proto, paint_graypaint_grayPaintGrayPaintGrayPaintGraypaint_gray

Modul

Foundation