tile_imagestile_imagesTileImagesTileImagestile_images (算子)

名称

tile_imagestile_imagesTileImagesTileImagestile_images — 将多个图像对象平铺成一个大图像。

签名

tile_images(Images : TiledImage : NumColumns, TileOrder : )

Herror tile_images(const Hobject Images, Hobject* TiledImage, const Hlong NumColumns, const char* TileOrder)

Herror T_tile_images(const Hobject Images, Hobject* TiledImage, const Htuple NumColumns, const Htuple TileOrder)

void TileImages(const HObject& Images, HObject* TiledImage, const HTuple& NumColumns, const HTuple& TileOrder)

HImage HImage::TileImages(Hlong NumColumns, const HString& TileOrder) const

HImage HImage::TileImages(Hlong NumColumns, const char* TileOrder) const

HImage HImage::TileImages(Hlong NumColumns, const wchar_t* TileOrder) const   ( Windows only)

static void HOperatorSet.TileImages(HObject images, out HObject tiledImage, HTuple numColumns, HTuple tileOrder)

HImage HImage.TileImages(int numColumns, string tileOrder)

def tile_images(images: HObject, num_columns: int, tile_order: str) -> HObject

描述

tile_imagestile_imagesTileImagesTileImagesTileImagestile_images tiles multiple input image objects, which must contain the same number of channels, into a large image. The input image object ImagesImagesImagesImagesimagesimages contains Num images, which may be of different size. The output image TiledImageTiledImageTiledImageTiledImagetiledImagetiled_image contains as many channels as the input images. In the output image the Num input images have been tiled into NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns columns. Each tile has the same size, which is determined by the maximum width and height of all input images. If an input image is smaller than the tile size it is copied to the center of the respective tile. The parameter TileOrderTileOrderTileOrderTileOrdertileOrdertile_order determines the order in which the images are copied into the output in the cases in which this is not already determined by NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns (i.e., if NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns != 1 and NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns != Num). If TileOrderTileOrderTileOrderTileOrdertileOrdertile_order = 'horizontal'"horizontal""horizontal""horizontal""horizontal""horizontal" the images are copied in the horizontal direction, i.e., the second image of ImagesImagesImagesImagesimagesimages will be to the right of the first image. If TileOrderTileOrderTileOrderTileOrdertileOrdertile_order = 'vertical'"vertical""vertical""vertical""vertical""vertical" the images are copied in the vertical direction, i.e., the second image of ImagesImagesImagesImagesimagesimages will be below the first image. The domain of TiledImageTiledImageTiledImageTiledImagetiledImagetiled_image is obtained by copying the domains of ImagesImagesImagesImagesimagesimages to the corresponding locations in the output image. If Num is not a multiple of NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns the output image will have undefined gray values in the lower right corner of the image. The output domain will reflect this.

执行信息

参数

ImagesImagesImagesImagesimagesimages (输入对象)  (multichannel-)image-array objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

输入图像。

TiledImageTiledImageTiledImageTiledImagetiledImagetiled_image (输出对象)  (multichannel-)image objectHImageHObjectHImageHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

Tiled output image.

NumColumnsNumColumnsNumColumnsNumColumnsnumColumnsnum_columns (输入控制)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of columns to use for the output image.

默认值: 1

建议值: 1, 2, 3, 4, 5, 6, 7

限制: NumColumns >= 1

TileOrderTileOrderTileOrderTileOrdertileOrdertile_order (输入控制)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Order of the input images in the output image.

默认值: 'vertical' "vertical" "vertical" "vertical" "vertical" "vertical"

值列表: 'horizontal'"horizontal""horizontal""horizontal""horizontal""horizontal", 'vertical'"vertical""vertical""vertical""vertical""vertical"

示例(HDevelop)

* Grab 5 (multi-channel) images and stack them vertically.
gen_empty_obj (Images)
for I := 1 to 5 by 1
    grab_image_async (ImageGrabbed, AcqHandle, -1)
    concat_obj (Images, ImageGrabbed, Images)
endfor
tile_images (Images, TiledImage, 1, 'vertical')

结果

tile_imagestile_imagesTileImagesTileImagesTileImagestile_images 在所有参数正确且执行过程中未发生错误时返回 2 ( H_MSG_TRUE )。如果输入为空则可设置行为通过 set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的前趋

append_channelappend_channelAppendChannelAppendChannelAppendChannelappend_channel

替代

tile_channelstile_channelsTileChannelsTileChannelsTileChannelstile_channels, tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsetTileImagesOffsettile_images_offset

另见

change_formatchange_formatChangeFormatChangeFormatChangeFormatchange_format, crop_partcrop_partCropPartCropPartCropPartcrop_part, crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1crop_rectangle1

模块

基础