bit_slicebit_sliceBitSliceBitSlice (Operator)

Name

bit_slicebit_sliceBitSliceBitSlice — Extraktion eines Bits aus den Pixeln.

Signatur

bit_slice(Image : ImageSlice : Bit : )

Herror bit_slice(const Hobject Image, Hobject* ImageSlice, const Hlong Bit)

Herror T_bit_slice(const Hobject Image, Hobject* ImageSlice, const Htuple Bit)

void BitSlice(const HObject& Image, HObject* ImageSlice, const HTuple& Bit)

HImage HImage::BitSlice(Hlong Bit) const

static void HOperatorSet.BitSlice(HObject image, out HObject imageSlice, HTuple bit)

HImage HImage.BitSlice(int bit)

Beschreibung

bit_slicebit_sliceBitSliceBitSliceBitSlice extrahiert eine Bitebene aus dem Eingabebild. Die Semantik der „and“ Operation entspricht der von C für die jeweiligen Typen (signed char, unsigned char, short, unsigned short, int/long). Es werden nur die Bildpunkte innerhalb des Definitionsbereiches des Bildes bearbeitet.

Es können mehrere Bilder pro Aufruf bearbeitet werden. Zu jedem Eingabebild wird ein Ausgabebild erzeugt.

Ausführungsinformationen

Parameter

ImageImageImageImageimage (input_object)  (multichannel-)image(-array) objectHImageHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Eingabebild(er).

ImageSliceImageSliceImageSliceImageSliceimageSlice (output_object)  (multichannel-)image(-array) objectHImageHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4)

Ergebnis(se) der Extraktion.

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

Auszuwählendes Bit.

Defaultwert: 8

Wertevorschläge: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 32

Typischer Wertebereich: 1 ≤ Bit Bit Bit Bit bit ≤ 32

Minimale Schrittweite: 1

Empfohlene Schrittweite: 1

Restriktion: Bit >= 1 && Bit <= 32

Beispiel (HDevelop)

read_image(Image,'fabrik')
for I:= 1 to 8 by 1
    bit_slice (Image, ImageSlice, I)
    threshold (ImageSlice, Region, 1, 255)
    dev_display (Region)
endfor

Beispiel (C)

read_image(&ByteImage,"fabrik");
for (bit=1; bit<=8; i++)
{
  bit_slice(ByteImage,&Slice,bit);
  threshold(Slice,&Region,1,255);
  disp_region(Region,WindowHandle);
  clear(bit_slice); clear(Slice); clear(Region);
}

Beispiel (HDevelop)

read_image(Image,'fabrik')
for I:= 1 to 8 by 1
    bit_slice (Image, ImageSlice, I)
    threshold (ImageSlice, Region, 1, 255)
    dev_display (Region)
endfor

Beispiel (HDevelop)

read_image(Image,'fabrik')
for I:= 1 to 8 by 1
    bit_slice (Image, ImageSlice, I)
    threshold (ImageSlice, Region, 1, 255)
    dev_display (Region)
endfor

Beispiel (HDevelop)

read_image(Image,'fabrik')
for I:= 1 to 8 by 1
    bit_slice (Image, ImageSlice, I)
    threshold (ImageSlice, Region, 1, 255)
    dev_display (Region)
endfor

Ergebnis

Sind die Bilder korrekt (Typ) und hat BitBitBitBitbit eine gültigen Wert, dann liefert bit_slicebit_sliceBitSliceBitSliceBitSlice den Wert 2 (H_MSG_TRUE). Das Verhalten bei leerer Eingabe (keine Eingabebilder 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. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Nachfolger

thresholdthresholdThresholdThresholdThreshold, bit_orbit_orBitOrBitOrBitOr

Alternativen

bit_maskbit_maskBitMaskBitMaskBitMask

Siehe auch

bit_andbit_andBitAndBitAndBitAnd, bit_lshiftbit_lshiftBitLshiftBitLshiftBitLshift

Modul

Foundation