mult_imagemult_imageMultImageMultImage (Operator)

Name

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

Beschreibung

mult_imagemult_imageMultImageMultImageMultImage multipliziert zwei Bilder. Die Grauwerte (g1,g2) der Eingabebilder (Image1Image1Image1Image1image1) 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_imageMultImageMultImageMultImage 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

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

Bild(er) 1.

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

Bild(er) 2.

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

Ergebnisbild(er) durch das Produkt.

MultMultMultMultmult (input_control)  number HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Faktor für Graubereichsanpassung.

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 ≤ 255.0

Minimale Schrittweite: 0.001

Empfohlene Schrittweite: 0.1

AddAddAddAddadd (input_control)  number HTupleHTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)

Wert für Graubereichsanpassung.

Defaultwert: 0

Wertevorschläge: 0.0, 128.0, 256.0

Typischer Wertebereich: -512.0 ≤ 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_imageMultImageMultImageMultImage liefert den Wert 2 (H_MSG_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>) festlegen. Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Alternativen

add_imageadd_imageAddImageAddImageAddImage, sub_imagesub_imageSubImageSubImageSubImage, div_imagediv_imageDivImageDivImageDivImage

Siehe auch

add_imageadd_imageAddImageAddImageAddImage, sub_imagesub_imageSubImageSubImageSubImage, div_imagediv_imageDivImageDivImageDivImage

Modul

Foundation