Skip to content

paint_grayPaintGrayPaintGraypaint_graypaint_gray🔗

説明🔗

paint_grayPaintGrayPaintGraypaint_graypaint_gray — 画像のグレイ値を他の画像にコピーする。

書式🔗

paint_gray( image ImageSource, image ImageDestination, out image MixedImage )void PaintGray( const HObject& ImageSource, const HObject& ImageDestination, HObject* MixedImage )static void HOperatorSet.PaintGray( HObject imageSource, HObject imageDestination, out HObject mixedImage )def paint_gray( image_source: HObject, image_destination: HObject ) -> HObject

Herror paint_gray( const Hobject ImageSource, const Hobject ImageDestination, Hobject* MixedImage )

Herror T_paint_gray( const Hobject ImageSource, const Hobject ImageDestination, Hobject* MixedImage )

HImage HImage::PaintGray( const HImage& ImageDestination ) const

HImage HImage.PaintGray( HImage imageDestination )

説明🔗

paint_grayPaintGray は ImageSourceimageSourceimage_source で与えられた画像のグレ イ値を ImageDestinationimageDestinationimage_destination の画像にペイントし、 MixedImagemixedImagemixed_image に結果の画像を返します。ImageSourceimageSourceimage_source の領域のグレイ値のみがコピーされます。(reduce_domainReduceDomain を参 照してください。)

paint_grayPaintGray に代わる手段として、オペレーター overpaint_grayOverpaintGray を使用することができ、 ImageDestinationimageDestinationimage_destination に直接グレイ値をペイントします。

実行情報🔗

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

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

  • 並列演算処理には未対応

パラメーター🔗

ImageSourceimageSourceimage_source (input_object) (multichannel-)image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)

上書きするグレイ値を含む入力画像

ImageDestinationimageDestinationimage_destination (input_object) (multichannel-)image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)Hobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)

上書きする入力画像

MixedImagemixedImagemixed_image (output_object) image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HImage (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)HObject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)Hobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real / complex / vector_field)

結果として得られる画像

例🔗

(HDevelop)


* Copy a circular part of the image 'monkey' into the image 'fabrik':

read_image(Image,'monkey')
gen_circle(Circle,200,200,150)
reduce_domain(Image,Circle,Mask)
read_image(Image2,'fabrik')
* Copy a part of the image 'monkey' into 'fabrik'
paint_gray(Mask,Image2,MixedImage)
(C)
/* Copy a circular part of the image 'monkey' into the image 'fabrik': */

read_image(&Image,"monkey")\;
gen_circle(&Circle,200.0,200.0,150.0)\;
reduce_domain(Image,Circle,&Mask)\;
read_image(&Image,"fabrik")\;
/* Copy a part of the image 'monkey' into 'fabrik' */
paint_gray(Mask,Image2,&MixedImage)\;

結果🔗

paint_grayPaintGray は、すべてのパラメーターが正しい場合に 2 (H_MSG_TRUE) を 返します。必要に応じて、例外が発生します。

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

組み合わせ

前処理の候補

read_imageReadImage, gen_image_constGenImageConst, gen_image_protoGenImageProto

他の選択候補

get_image_pointer1GetImagePointer1, set_grayvalSetGrayval, copy_imageCopyImage, overpaint_grayOverpaintGray

関連項目

paint_regionPaintRegion, overpaint_regionOverpaintRegion

モジュール🔗

Foundation