tile_images_offset🔗
説明🔗
tile_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 )
説明🔗
tile_images_offset は、同じ数のチャンネルが含まれる複数の
入力画像を、ひとつの大きな画像内にタイリングします。
入力画像オブジェクト Images には、
異なるサイズの Num 画像が含まれます。
画像 Images のすべてのチャンネルは同じタイプである必要があります。
出力画像 TiledImage には、入力画像と同数のチャンネルが
含まれます。出力画像のサイズは、パラメーター Width と
Height で決まります。出力画像における入力画像の左上の位置は、
パラメーター OffsetRow と OffsetCol で決まります。
どちらのパラメーターにも、正確な Num 値が含まれます。
オプションとして、各入力画像は、入力画像よりも小さい任意の矩形に
切り取られます。パラメーター Row1,
Col1, Row2 および Col2 は、矩形の切り取りに
用いるパラメーターです。これら4つのパラメーターの
いずれかが -1 に設定されていれば、対応する入力画像は
切り取りが行われません。いかなる場合も、4つのパラメーターには、
すべて Num 値が含まれます。入力画像が切り取られると、
位置決定パラメーター OffsetRow と OffsetCol は、
切り取られた画像の左上の座標として設定されます。入力画像が(画像のドメインを
含め)互いにオーバーラップした場合、
Images において、大きいインデックスを持つ画像が、小さい
インデックスの画像のデータに上書きされます。TiledImage の
ドメインは、対応する位置に Images の
ドメインをコピーすることで得られます。
注意🔗
入力画像すべてが同じサイズで、出力画像の正確なタイリングを行った場合、
tile_images の方が、通常わずかに速く動作します。
実行情報🔗
実行情報
-
マルチスレッドタイプ: リエントラント(非排他なオペレーターと並列に動作)
-
マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)
-
内部データレベルで自動的に並列演算処理を実施
パラメーター🔗
Images (input_object) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
入力画像
TiledImage (output_object) (multichannel-)image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
タイリングされた出力画像
OffsetRow (input_control) point.y(-array) → (integer)
出力画像における入力画像の左上の行座標
初期値: 0
推奨値: 0, 50, 100, 150, 200, 250
OffsetCol (input_control) point.x(-array) → (integer)
出力画像における入力画像の左上の列座標
初期値: 0
推奨値: 0, 50, 100, 150, 200, 250
Row1 (input_control) rectangle.origin.y(-array) → (integer)
各入力画像のコピーされた部分の左上の行座標
初期値: -1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500
Col1 (input_control) rectangle.origin.x(-array) → (integer)
各入力画像のコピーされた部分の左上の列座標
初期値: -1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500
Row2 (input_control) rectangle.corner.y(-array) → (integer)
各入力画像のコピーされた部分の右下の行座標
初期値: -1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500
Col2 (input_control) rectangle.corner.x(-array) → (integer)
各入力画面のコピーされた部分の右下の列座標
初期値: -1
推奨値: -1, 0, 10, 20, 50, 100, 200, 300, 500
Width (input_control) extent.x → (integer)
出力画像の幅
初期値: 512
推奨値: 32, 64, 128, 256, 512, 768, 1024, 2048, 4096
Height (input_control) extent.y → (integer)
出力画像の高さ
初期値: 512
推奨値: 32, 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_offset は、値 2 (H_MSG_TRUE) を返します。入力が空であれば、
その動作は set_system(::'no_object_result',<Result>:) に従います。必要であれば、例外が発生します。
他のオペレーターとの組み合わせ🔗
組み合わせ
前処理の候補
他の選択候補
関連項目
モジュール🔗
Foundation