Skip to content

div_imageDivImageDivImagediv_imagediv_image🔗

説明🔗

div_imageDivImageDivImagediv_imagediv_image — 2つの画像間の除算を行う。

書式🔗

div_image( image Image1, image Image2, out image ImageResult, number Mult, number Add )void DivImage( const HObject& Image1, const HObject& Image2, HObject* ImageResult, const HTuple& Mult, const HTuple& Add )static void HOperatorSet.DivImage( HObject image1, HObject image2, out HObject imageResult, HTuple mult, HTuple add )def div_image( image_1: HObject, image_2: HObject, mult: Union[int, float], add: Union[int, float] ) -> HObject

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

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

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

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

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

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

説明🔗

オペレーター div_imageDivImage は 2つの画像の除算を行ないます。 入力画像 (Image1image1image_1) のグレイ値 (g1,g2) は、 次式のように変換されます: g’ := g1 / g2 * Mult + Add もしオーバーフローかアンダーフローが生じた場合、その値は クリッピンクされます。ただし、cyclic型画像を除きます。

* 複数の画像を一度の呼び出しで処理することができます。 この場合、2つのパラメーターには処理を適用する組み合わせ順に同じ枚数の画像を入力する必要があります。 出力画像はすべての対に対して生成されます。

div_imageDivImage はOpenCLに対応しており、byte、direction、cyclic、int1、int2、uint2、int4 および real 画像を処理できます。しかし、OpenCL 1.0 では単精度浮動小数点しかサポートされておらず、また小数部に対する丸め誤差についてもすべてはサポートされていません。そのため、OpenCLの出力では、 スカラー演算の出力とわずかに異なる結果が得られます。

実行情報🔗

実行情報
  • OpenCL演算デバイスによる演算をサポート

  • マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • ドメインレベルで自動的に並列演算処理を実施

パラメーター🔗

Image1image1image_1 (input_object) (multichannel-)image(-array) → object (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)HImage (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)Hobject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*) *計算デバイスに対して有効

画像 1

Image2image2image_2 (input_object) (multichannel-)image(-array) → object (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)HImage (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)HObject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*)Hobject (byte* / int1* / int2* / uint2* / int4* / int8 / real* / complex*) *計算デバイスに対して有効

画像 2

ImageResultimageResultimage_result (output_object) (multichannel-)image(-array) → object (byte / int1 / int2 / uint2 / int4 / int8 / real / complex)HObject (byte / int1 / int2 / uint2 / int4 / int8 / real / complex)HImage (byte / int1 / int2 / uint2 / int4 / int8 / real / complex)HObject (byte / int1 / int2 / uint2 / int4 / int8 / real / complex)Hobject * (byte / int1 / int2 / uint2 / int4 / int8 / real / complex)

分割された結果の画像

Multmultmult (input_control) number → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)Union[int, float]Htuple (double / Hlong)

グレイ値の範囲調整のための係数

初期値: 255255
推奨値: 0.1, 0.2, 0.5, 1.0, 2.0, 3.0, 10, 100, 500, 10000.1, 0.2, 0.5, 1.0, 2.0, 3.0, 10, 100, 500, 1000
値域: -1000 ≤ Mult ≤ 1000
最小増分: 0.001
推奨増分: 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.0, 10250.0, 128.0, 256.0, 1025
値域: -1000 ≤ Add ≤ 1000
最小増分: 0.01
推奨増分: 1.0

例🔗

(HDevelop)


read_image(Image1,'fabrik')
dev_display (Image1)
read_image(Image2,'monkey')
dev_display (Image2)
div_image (Image1, Image2, Result, 200, 10)
dev_display (Result)
(C)
read_image(&Image1,"fabrik")\;
disp_image(Image1,WindowHandle)\;
read_image(&Image2,"monkey")\;
disp_image(Image2,WindowHandle)\;
div_image(Image1,Image2,&Result,200.0,10.0)\;
disp_image(Result,WindowHandle)\;

結果🔗

パラメーターが正しいならば、オペレーター div_imageDivImage は、 値 2 (H_MSG_TRUE) を返します。空の入力(利用できる入力画像がない)の場合、 オペレーター set_system(::'no_object_result',<Result>:) を 通して動作します。必要であれば、例外処理が発生します。

他のオペレーターとの組み合わせ🔗

組み合わせ

他の選択候補

add_imageAddImage, sub_imageSubImage, mult_imageMultImage

関連項目

add_imageAddImage, sub_imageSubImage, mult_imageMultImage

モジュール🔗

Foundation