mult_imageMultImageMultImagemult_imagemult_image
説明
mult_imageMultImageMultImagemult_imagemult_image — 2 つの画像の乗算を行う。
書式
mult_image( image Image1, image Image2, out image ImageResult, number Mult, number Add )void MultImage( const HObject& Image1, const HObject& Image2, HObject* ImageResult, const HTuple& Mult, const HTuple& Add )static void HOperatorSet.MultImage( HObject image1, HObject image2, out HObject imageResult, HTuple mult, HTuple add )def mult_image( image_1: HObject, image_2: HObject, mult: Union[int, float], add: Union[int, float] ) -> HObject
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 )
HImage HImage::MultImage( const HImage& Image2, const HTuple& Mult, const HTuple& Add ) const
HImage HImage::MultImage( const HImage& Image2, double Mult, double Add ) const
HImage HImage.MultImage( HImage image2, HTuple mult, HTuple add )
HImage HImage.MultImage( HImage image2, double mult, double add )
説明
mult_imageMultImage は 2 つの画像を乗算します。
入力画像 (Image1image1image_1) のグレイ値 (g1,g2) は、
次式に示すように変換されます:
g’ := g1 * g2 * Mult + Add
もしオーバーフローかアンダーフローが起こるならば、その値は
クリッピングされます。ただし、cyclic型画像を除きます。
*
複数の画像を 1 つの呼び出しで処理することができます。この場合、
、2つのパラメーターには処理を適用する組み合わせ順に同じ枚数の画像を入力する必要があります。
出力画像はすべての対に対して生成されます。
mult_imageMultImage はOpenCLに対応しており、byte、direction、cyclic、int1、int2、uint2、int4
および real 画像を処理できます。しかし、OpenCL 1.0
では単精度浮動小数点しかサポートされておらず、また小数部に対する丸め誤差についてもすべてはサポートされていません。
そのため、OpenCLの出力では、スカラー演算の出力とわずかに異なる結果が得られます。
実行情報
実行情報
パラメーター
Image1image1image_1 (input_object) (multichannel-)image(-array) → object (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)HImage (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)Hobject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*) *計算デバイスに対して有効
画像 1
Image2image2image_2 (input_object) (multichannel-)image(-array) → object (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)HImage (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*)Hobject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / direction* / cyclic* / complex*) *計算デバイスに対して有効
画像 2
ImageResultimageResultimage_result (output_object) (multichannel-)image(-array) → object (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)HObject (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)HImage (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)HObject (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)Hobject * (byte / int1 / int2 / uint2 / int4 / int8 / real / direction / cyclic / complex)
積による結果の画像
Multmultmult (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)
グレイ値の範囲調整のための係数
初期値: 0.0050.005
推奨値: 0.001, 0.01, 0.5, 1.0, 2.0, 3.0, 5.0, 10.00.001, 0.01, 0.5, 1.0, 2.0, 3.0, 5.0, 10.0
値域: -255.0 ≤ Mult ≤ 255.0
最小増分: 0.001
推奨増分: 0.1
Addaddadd (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)
グレイ値の範囲調整のためのオフセット
初期値: 00
推奨値: 0.0, 128.0, 256.00.0, 128.0, 256.0
値域: -512.0 ≤ Add ≤ 512.0
最小増分: 0.01
推奨増分: 1.0
例
(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)
(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)\;
結果
パラメーターが正しいならば、オペレーター mult_imageMultImage は、
値 2 (H_MSG_TRUE) を返します。空の入力(利用可能な入力画像がない)の場合、
オペレーター set_system(::'no_object_result',<Result>:) を
通して動作します。必要であれば、例外が発生します。
他のオペレーターとの組み合わせ
組み合わせ
他の選択候補
add_imageAddImage, sub_imageSubImage, div_imageDivImage
関連項目
add_imageAddImage, sub_imageSubImage, div_imageDivImage
モジュール
Foundation