Operator Reference

tile_imagestile_imagesTileImagesTileImagestile_images (Operator)

tile_imagestile_imagesTileImagesTileImagestile_images — Tile multiple image objects into a large image.

Signature

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

Description

tile_imagestile_imagesTileImagesTileImagestile_images tiles multiple input image objects, which must contain the same number of channels, into a large image. The input image object ImagesImagesImagesimagesimages contains Num images, which may be of different size. The output image TiledImageTiledImageTiledImagetiledImagetiled_image contains as many channels as the input images. In the output image the Num input images have been tiled into NumColumnsNumColumnsNumColumnsnumColumnsnum_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 TileOrderTileOrderTileOrdertileOrdertile_order determines the order in which the images are copied into the output in the cases in which this is not already determined by NumColumnsNumColumnsNumColumnsnumColumnsnum_columns (i.e., if NumColumnsNumColumnsNumColumnsnumColumnsnum_columns != 1 and NumColumnsNumColumnsNumColumnsnumColumnsnum_columns != Num). If TileOrderTileOrderTileOrdertileOrdertile_order = 'horizontal'"horizontal""horizontal""horizontal""horizontal" the images are copied in the horizontal direction, i.e., the second image of ImagesImagesImagesimagesimages will be to the right of the first image. If TileOrderTileOrderTileOrdertileOrdertile_order = 'vertical'"vertical""vertical""vertical""vertical" the images are copied in the vertical direction, i.e., the second image of ImagesImagesImagesimagesimages will be below the first image. The domain of TiledImageTiledImageTiledImagetiledImagetiled_image is obtained by copying the domains of ImagesImagesImagesimagesimages to the corresponding locations in the output image. If Num is not a multiple of NumColumnsNumColumnsNumColumnsnumColumnsnum_columns the output image will have undefined gray values in the lower right corner of the image. The output domain will reflect this.

Execution Information

  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).
  • Multithreading scope: global (may be called from any thread).
  • Automatically parallelized on internal data level.

Parameters

ImagesImagesImagesimagesimages (input_object)  (multichannel-)image-array objectHImageHObjectHObjectHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

Input images.

TiledImageTiledImageTiledImagetiledImagetiled_image (output_object)  (multichannel-)image objectHImageHObjectHObjectHobject * (byte / direction / cyclic / int1 / int2 / uint2 / int4 / int8 / real)

Tiled output image.

NumColumnsNumColumnsNumColumnsnumColumnsnum_columns (input_control)  integer HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Number of columns to use for the output image.

Default: 1

Suggested values: 1, 2, 3, 4, 5, 6, 7

Restriction: NumColumns >= 1

TileOrderTileOrderTileOrdertileOrdertile_order (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Order of the input images in the output image.

Default: 'vertical' "vertical" "vertical" "vertical" "vertical"

List of values: 'horizontal'"horizontal""horizontal""horizontal""horizontal", 'vertical'"vertical""vertical""vertical""vertical"

Example (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')

Result

tile_imagestile_imagesTileImagesTileImagestile_images returns 2 ( H_MSG_TRUE) if all parameters are correct and no error occurs during execution. If the input is empty the behavior can be set via set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

append_channelappend_channelAppendChannelAppendChannelappend_channel

Alternatives

tile_channelstile_channelsTileChannelsTileChannelstile_channels, tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offset

See also

change_formatchange_formatChangeFormatChangeFormatchange_format, crop_partcrop_partCropPartCropPartcrop_part, crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1crop_rectangle1

Module

Foundation