Skip to content

tile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offsettile_images_offset🔗

説明🔗

tile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offsettile_images_offset — 複数の画像オブジェクトを位置情報を指定して ひとつの大きな画像に変換する。

書式🔗

tile_images_offset( image Images, out image TiledImage, point.y OffsetRow, point.x OffsetCol, rectangle.origin.y Row1, rectangle.origin.x Col1, rectangle.corner.y Row2, rectangle.corner.x Col2, extent.x Width, extent.y Height )void TileImagesOffset( const HObject& Images, HObject* TiledImage, const HTuple& OffsetRow, const HTuple& OffsetCol, const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, const HTuple& Width, const HTuple& Height )static void HOperatorSet.TileImagesOffset( HObject images, out HObject tiledImage, HTuple offsetRow, HTuple offsetCol, HTuple row1, HTuple col1, HTuple row2, HTuple col2, HTuple width, HTuple height )def tile_images_offset( images: HObject, offset_row: MaybeSequence[int], offset_col: MaybeSequence[int], row_1: MaybeSequence[int], col_1: MaybeSequence[int], row_2: MaybeSequence[int], col_2: MaybeSequence[int], width: int, height: int ) -> HObject

Herror tile_images_offset( const Hobject Images, Hobject* TiledImage, const Hlong OffsetRow, const Hlong OffsetCol, const Hlong Row1, const Hlong Col1, const Hlong Row2, const Hlong Col2, const Hlong Width, const Hlong Height )

Herror T_tile_images_offset( const Hobject Images, Hobject* TiledImage, const Htuple OffsetRow, const Htuple OffsetCol, const Htuple Row1, const Htuple Col1, const Htuple Row2, const Htuple Col2, const Htuple Width, const Htuple Height )

HImage HImage::TileImagesOffset( const HTuple& OffsetRow, const HTuple& OffsetCol, const HTuple& Row1, const HTuple& Col1, const HTuple& Row2, const HTuple& Col2, Hlong Width, Hlong Height ) const

HImage HImage::TileImagesOffset( Hlong OffsetRow, Hlong OffsetCol, Hlong Row1, Hlong Col1, Hlong Row2, Hlong Col2, Hlong Width, Hlong Height ) const

HImage HImage.TileImagesOffset( HTuple offsetRow, HTuple offsetCol, HTuple row1, HTuple col1, HTuple row2, HTuple col2, int width, int height )

HImage HImage.TileImagesOffset( int offsetRow, int offsetCol, int row1, int col1, int row2, int col2, int width, int height )

説明🔗

tile_images_offsetTileImagesOffset は、同じ数のチャンネルが含まれる複数の 入力画像を、ひとつの大きな画像内にタイリングします。 入力画像オブジェクト Imagesimagesimages には、 異なるサイズの Num 画像が含まれます。 画像 Imagesimagesimages のすべてのチャンネルは同じタイプである必要があります。 出力画像 TiledImagetiledImagetiled_image には、入力画像と同数のチャンネルが 含まれます。出力画像のサイズは、パラメーター Widthwidthwidth と Heightheightheight で決まります。出力画像における入力画像の左上の位置は、 パラメーター OffsetRowoffsetRowoffset_row と OffsetColoffsetColoffset_col で決まります。 どちらのパラメーターにも、正確な Num 値が含まれます。 オプションとして、各入力画像は、入力画像よりも小さい任意の矩形に 切り取られます。パラメーター Row1row1row_1, Col1col1col_1, Row2row2row_2 および Col2col2col_2 は、矩形の切り取りに 用いるパラメーターです。これら4つのパラメーターの いずれかが -1-1 に設定されていれば、対応する入力画像は 切り取りが行われません。いかなる場合も、4つのパラメーターには、 すべて Num 値が含まれます。入力画像が切り取られると、 位置決定パラメーター OffsetRowoffsetRowoffset_row と OffsetColoffsetColoffset_col は、 切り取られた画像の左上の座標として設定されます。入力画像が(画像のドメインを 含め)互いにオーバーラップした場合、 Imagesimagesimages において、大きいインデックスを持つ画像が、小さい インデックスの画像のデータに上書きされます。TiledImagetiledImagetiled_image の ドメインは、対応する位置に Imagesimagesimages の ドメインをコピーすることで得られます。

注意🔗

入力画像すべてが同じサイズで、出力画像の正確なタイリングを行った場合、 tile_imagesTileImages の方が、通常わずかに速く動作します。

実行情報🔗

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

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

  • 内部データレベルで自動的に並列演算処理を実施

パラメーター🔗

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

入力画像

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

タイリングされた出力画像

OffsetRowoffsetRowoffset_row (input_control) point.y(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

出力画像における入力画像の左上の行座標

初期値: 00
推奨値: 0, 50, 100, 150, 200, 2500, 50, 100, 150, 200, 250

OffsetColoffsetColoffset_col (input_control) point.x(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

出力画像における入力画像の左上の列座標

初期値: 00
推奨値: 0, 50, 100, 150, 200, 2500, 50, 100, 150, 200, 250

Row1row1row_1 (input_control) rectangle.origin.y(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

各入力画像のコピーされた部分の左上の行座標

初期値: -1-1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500-1, 0, 10, 20, 50, 100, 200, 300, 500

Col1col1col_1 (input_control) rectangle.origin.x(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

各入力画像のコピーされた部分の左上の列座標

初期値: -1-1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500-1, 0, 10, 20, 50, 100, 200, 300, 500

Row2row2row_2 (input_control) rectangle.corner.y(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

各入力画像のコピーされた部分の右下の行座標

初期値: -1-1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500-1, 0, 10, 20, 50, 100, 200, 300, 500

Col2col2col_2 (input_control) rectangle.corner.x(-array) → (integer)HTuple (Hlong)HTuple (int / long)MaybeSequence[int]Htuple (Hlong)

各入力画面のコピーされた部分の右下の列座標

初期値: -1-1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500-1, 0, 10, 20, 50, 100, 200, 300, 500

Widthwidthwidth (input_control) extent.x → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

出力画像の幅

初期値: 512512
推奨値: 32, 64, 128, 256, 512, 768, 1024, 2048, 409632, 64, 128, 256, 512, 768, 1024, 2048, 4096

Heightheightheight (input_control) extent.y → (integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

出力画像の高さ

初期値: 512512
推奨値: 32, 64, 128, 256, 512, 525, 1024, 2048, 409632, 64, 128, 256, 512, 525, 1024, 2048, 4096

例🔗

(HDevelop)


* Example 1
* Grab 2 (multi-channel) NTSC images, crop the bottom 5 lines off
* of each image, the right 5 columns off of the first image, and
* the left five lines off of the second image, and put the cropped
* images side-by-side.
gen_empty_obj (Images)
for I := 1 to 2 by 1
    grab_image_async (ImageGrabbed, AcqHandle, -1)
    concat_obj (Images, ImageGrabbed, Images)
endfor
tile_images_offset (Images, TiledImage, [0,635], [0,0], [0,0], \
                    [0,5], [474,474], [634,639], 635, 950)

* Example 2
* Enlarge image by 15 rows and columns on all sides
EnlargeColsBy := 15
EnlargeRowsBy := 15
get_image_pointer1 (Image, Pointer, Type, WidthImage, HeightImage)
tile_images_offset (Image, EnlargedImage, EnlargeRowsBy, EnlargeColsBy, \
                    -1, -1, -1, -1, WidthImage + EnlargeColsBy*2, \
                    HeightImage + EnlargeRowsBy*2)

結果🔗

すべてのパラメーターが正しく、実行中にエラーが起きなければ、 tile_images_offsetTileImagesOffset は、値 2 (H_MSG_TRUE) を返します。入力が空であれば、 その動作は set_system(::'no_object_result',<Result>:) に従います。必要であれば、例外が発生します。

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

組み合わせ

前処理の候補

append_channelAppendChannel

他の選択候補

tile_channelsTileChannels, tile_imagesTileImages

関連項目

change_formatChangeFormat, crop_partCropPart, crop_rectangle1CropRectangle1

モジュール🔗

Foundation