mult_imagemult_imageMultImageMultImagemult_image (Operator)

Name

mult_imagemult_imageMultImageMultImagemult_image — Multiplizieren zweier Bilder.

Signatur

mult_image(Image1, Image2 : ImageResult : Mult, Add : )

Herror mult_image(const Hobject Image1, const Hobject Image2, Hobject* ImageResult, double Mult, double Add)

Herror T_mult_image(const Hobject Image1, const Hobject Image2, Hobject* ImageResult, const Htuple Mult, const Htuple Add)

void MultImage(const HObject& Image1, const HObject& Image2, HObject* ImageResult, const HTuple& Mult, const HTuple& Add)

HImage HImage::MultImage(const HImage& Image2, const HTuple& Mult, const HTuple& Add) const

HImage HImage::MultImage(const HImage& Image2, double Mult, double Add) const

static void HOperatorSet.MultImage(HObject image1, HObject image2, out HObject imageResult, HTuple mult, HTuple add)

HImage HImage.MultImage(HImage image2, HTuple mult, HTuple add)

HImage HImage.MultImage(HImage image2, double mult, double add)

def mult_image(image_1: HObject, image_2: HObject, mult: Union[int, float], add: Union[int, float]) -> HObject

Beschreibung

mult_imagemult_imageMultImageMultImageMultImagemult_image multipliziert zwei Bilder. Die Grauwerte (g1,g2) der Eingabebilder (Image1Image1Image1Image1image1image_1) werden dabei wie folgt transformiert: g' := g1 * g2 * Mult + Add Tritt ein Überlauf oder ein Unterlauf ein, so werden die Werte beschnitten. Dies gilt nicht im Fall von cyclic- und direction-Bildern.

Es können mehrere Bilder pro Aufruf bearbeitet werden. In diesem Fall enthalten beide Eingabeparameter gleich viele Bilder, die dann paarweise abgearbeitet werden. Zu jedem Paar wird ein Ausgabebild erzeugt.

mult_imagemult_imageMultImageMultImageMultImagemult_image kann für byte-, int1-, int2-, uint2-, int4-, real-, direction-, cyclic-, und complex-Bildern auf OpenCL-Geräten ausgeführt werden. Da OpenCL 1.0 aber nur einfache genaue Fließkommaunterstützung voraussetzt und nicht alle Rundungsarten unterstützt werden, kann das Ergebnis der OpenCL-Implementierung geringfügig von dem der skalaren Implementierung abweichen.

Ausführungsinformationen

Parameter

Image1Image1Image1Image1image1image_1 (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*) *erlaubt für Compute Devices

Bild(er) 1.

Image2Image2Image2Image2image2image_2 (input_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*) *erlaubt für Compute Devices

Bild(er) 2.

ImageResultImageResultImageResultImageResultimageResultimage_result (output_object)  (multichannel-)image(-array) objectHImageHObjectHImageHobject * (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)

Ergebnisbild(er) durch das Produkt.

MultMultMultMultmultmult (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Faktor für Grauwertbereichsanpassung.

Defaultwert: 0.005

Wertevorschläge: 0.001, 0.01, 0.5, 1.0, 2.0, 3.0, 5.0, 10.0

Typischer Wertebereich: -255.0 ≤ Mult Mult Mult Mult mult mult ≤ 255.0

Minimale Schrittweite: 0.001

Empfohlene Schrittweite: 0.1

AddAddAddAddaddadd (input_control)  number HTupleUnion[int, float]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Wert für Grauwertbereichsanpassung.

Defaultwert: 0

Wertevorschläge: 0.0, 128.0, 256.0

Typischer Wertebereich: -512.0 ≤ Add Add Add Add add add ≤ 512.0

Minimale Schrittweite: 0.01

Empfohlene Schrittweite: 1.0

Beispiel (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
mult_image (Image1, Image2, Result, 0.01, 10)
dev_display (Result)

Beispiel (C)

read_image(&Image1,"fabrik");
disp_image(Image1,WindowHandle);
read_image(&Image2,"monkey");
disp_image(Image2,WindowHandle);
mult_image(Image1,Image2,&Result,0.01,10.0);
disp_image(Result,WindowHandle);

Beispiel (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
mult_image (Image1, Image2, Result, 0.01, 10)
dev_display (Result)

Beispiel (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
mult_image (Image1, Image2, Result, 0.01, 10)
dev_display (Result)

Beispiel (HDevelop)

read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
mult_image (Image1, Image2, Result, 0.01, 10)
dev_display (Result)

Ergebnis

mult_imagemult_imageMultImageMultImageMultImagemult_image liefert den Wert TRUE, falls die Parameter korrekt sind. 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>)set_system("no_object_result",<Result>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Alternativen

add_imageadd_imageAddImageAddImageAddImageadd_image, sub_imagesub_imageSubImageSubImageSubImagesub_image, div_imagediv_imageDivImageDivImageDivImagediv_image

Siehe auch

add_imageadd_imageAddImageAddImageAddImageadd_image, sub_imagesub_imageSubImageSubImageSubImagesub_image, div_imagediv_imageDivImageDivImageDivImagediv_image

Modul

Foundation