Skip to content

add_image_borderAddImageBorderAddImageBorderadd_image_borderadd_image_border🔗

説明🔗

add_image_borderAddImageBorderAddImageBorderadd_image_borderadd_image_border — 画像に境界を追加する。

書式🔗

add_image_border( image Image, out image ImageBorder, attribute.name Size, attribute.name Value )void AddImageBorder( const HObject& Image, HObject* ImageBorder, const HTuple& Size, const HTuple& Value )static void HOperatorSet.AddImageBorder( HObject image, out HObject imageBorder, HTuple size, HTuple value )def add_image_border( image: HObject, size: MaybeSequence[int], value: MaybeSequence[Union[int, str]] ) -> HObject

Herror add_image_border( const Hobject Image, Hobject* ImageBorder, const Hlong Size, const Hlong Value )

Herror T_add_image_border( const Hobject Image, Hobject* ImageBorder, const Htuple Size, const Htuple Value )

HImage HImage::AddImageBorder( const HTuple& Size, const HTuple& Value ) const

HImage HImage::AddImageBorder( Hlong Size, Hlong Value ) const

HImage HImage.AddImageBorder( HTuple size, HTuple value )

HImage HImage.AddImageBorder( int size, int value )

説明🔗

入力画像 Imageimageimage 境界を追加し、その結果を ImageBorderimageBorderimage_border で返す。

Sizesizesizeには、境界の大きさをピクセル単位で渡す必要があり 以下のように設定することができます。:

  • 1個の値:左/右/上/下の4方向の境界の大きさ。

  • 2個の値: 2つの数字:左右と上下の境界サイズ: [l/r, t/b]

  • 4個の値: 左右上下のボーダーサイズ: [l,r,t,b]

追加されるボーダーのグレイ値は、Valuevaluevalue で渡す必要があります。 以下のように設定することができます:

  • 1個の値: 数値は、Imageimageimage の全チャンネルに適用されます。

  • 複数の値: 数値は、画像の各チャンネルに個別に適用されます。したがって、最初の値は最初のチャンネルに適用さ れ、2番目の値は2番目のチャンネルに適用されます。 制限事項: 値の数は、チャンネルの数と同じでなければならない。

add_image_borderAddImageBorder は入力画像のドメインを無視し、常に 画像 ImageBorderimageBorderimage_border が最大のドメインで返されることに注意してください。

実行情報🔗

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

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

  • tupleレベルで自動的に並列演算処理を実施

パラメーター🔗

Imageimageimage (input_object) multichannel-image-array → object (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)HObject (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)HImage (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)HObject (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)Hobject (byte / direction / int1 / int2 / uint2 / int4 / int8 / real)

入力画像

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

出力画像

Sizesizesize (input_control) attribute.name(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

境界の大きさ(ピクセル)

初期値: 1010

Valuevaluevalue (input_control) attribute.name(-array) → (integer / string)HTuple (Hlong / HString)HTuple (int / long / string)MaybeSequence[Union[int, str]]Htuple (Hlong / char*)

境界のグレイ値

初期値: 100100

例🔗

(HDevelop)


* Add a border of 20 pixels with a constant gray value of 255
* on all four sides of Image
read_image (Image, 'printer_chip/printer_chip_01')
add_image_border (Image, ImageBorder, 20, 255)

* Add a 10-pixel border with a constant gray value of 255 to
* the left and right side and a 20-pixel border with the same
* gray value to the top and bottom of Image.
read_image (Image, 'printer_chip/printer_chip_01')
add_image_border (Image, ImageBorder, [10, 20], 255)

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

組み合わせ

他の選択候補

tile_images_offsetTileImagesOffset

モジュール🔗

Foundation