tile_images_offset — 将多个图像对象平铺成具有明确定位信息的大图像。
tile_images_offset(Images : TiledImage : OffsetRow, OffsetCol, Row1, Col1, Row2, Col2, Width, Height : )
tile_images_offset tiles multiple input image objects, which
must contain the same number of channels, into a large image. The
input image object Images contains Num images,
which may be of different size. The output image
TiledImage contains as many channels as the input images.
The size of the output image is determined by the parameters
Width and Height. The position of the upper left
corner of the input images in the output images is determined by the
parameters OffsetRow and OffsetCol. Both
parameters must contain exactly Num values. Optionally,
each input image can be cropped to an arbitrary rectangle that is
smaller than the input image. To do so, the parameters
Row1, Col1, Row2, and Col2 must
be set accordingly. If any of these four parameters is set to
-1, the corresponding input image is not cropped. In any
case, all four parameters must contain Num values. If the
input images are cropped the position parameters OffsetRow
and OffsetCol refer to the upper left corner of the cropped
image. If the input images overlap each other in the output image
(while taking into account their respective domains), the image with
the higher index in Images overwrites the image data of the
image with the lower index. The domain of TiledImage is
obtained by copying the domains of Images to the
corresponding locations in the output image.
If the input images all have the same size and tile the output image
exactly, the operator tile_images usually will be slightly
faster.
Images (输入对象) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
输入图像。
TiledImage (输出对象) (multichannel-)image → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)
Tiled output image.
OffsetRow (输入控制) point.y(-array) → (integer)
Row coordinate of the upper left corner of the input images in the output image.
默认值: 0
建议值: 0, 50, 100, 150, 200, 250
OffsetCol (输入控制) point.x(-array) → (integer)
Column coordinate of the upper left corner of the input images in the output image.
默认值: 0
建议值: 0, 50, 100, 150, 200, 250
Row1 (输入控制) rectangle.origin.y(-array) → (integer)
Row coordinate of the upper left corner of the copied part of the respective input image.
默认值: -1
建议值: -1, 0, 10, 20, 50, 100, 200, 300, 500
Col1 (输入控制) rectangle.origin.x(-array) → (integer)
Column coordinate of the upper left corner of the copied part of the respective input image.
默认值: -1
建议值: -1, 0, 10, 20, 50, 100, 200, 300, 500
Row2 (输入控制) rectangle.corner.y(-array) → (integer)
Row coordinate of the lower right corner of the copied part of the respective input image.
默认值: -1
建议值: -1, 0, 10, 20, 50, 100, 200, 300, 500
Col2 (输入控制) rectangle.corner.x(-array) → (integer)
Column coordinate of the lower right corner of the copied part of the respective input image.
默认值: -1
建议值: -1, 0, 10, 20, 50, 100, 200, 300, 500
Width (输入控制) extent.x → (integer)
输出图像的宽度。
默认值: 512
建议值: 32, 64, 128, 256, 512, 768, 1024, 2048, 4096
Height (输入控制) extent.y → (integer)
输出图像的高度。
默认值: 512
建议值: 32, 64, 128, 256, 512, 525, 1024, 2048, 4096
* 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>:)。如有必要,则抛出异常。
change_format,
crop_part,
crop_rectangle1
基础