Operator Reference

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offset (Operator)

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offset — Tile multiple image objects into a large image with explicit positioning information.

Signature

tile_images_offset(Images : TiledImage : OffsetRow, OffsetCol, Row1, Col1, Row2, Col2, Width, Height : )

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)

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)

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

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)

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)

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

Description

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offset 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. The size of the output image is determined by the parameters WidthWidthWidthwidthwidth and HeightHeightHeightheightheight. The position of the upper left corner of the input images in the output images is determined by the parameters OffsetRowOffsetRowOffsetRowoffsetRowoffset_row and OffsetColOffsetColOffsetColoffsetColoffset_col. 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 Row1Row1Row1row1row_1, Col1Col1Col1col1col_1, Row2Row2Row2row2row_2, and Col2Col2Col2col2col_2 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 OffsetRowOffsetRowOffsetRowoffsetRowoffset_row and OffsetColOffsetColOffsetColoffsetColoffset_col 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 ImagesImagesImagesimagesimages overwrites the image data of the image with the lower index. The domain of TiledImageTiledImageTiledImagetiledImagetiled_image is obtained by copying the domains of ImagesImagesImagesimagesimages to the corresponding locations in the output image.

Attention

If the input images all have the same size and tile the output image exactly, the operator tile_imagestile_imagesTileImagesTileImagestile_images usually will be slightly faster.

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.

OffsetRowOffsetRowOffsetRowoffsetRowoffset_row (input_control)  point.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinate of the upper left corner of the input images in the output image.

Default: 0

Suggested values: 0, 50, 100, 150, 200, 250

OffsetColOffsetColOffsetColoffsetColoffset_col (input_control)  point.x(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinate of the upper left corner of the input images in the output image.

Default: 0

Suggested values: 0, 50, 100, 150, 200, 250

Row1Row1Row1row1row_1 (input_control)  rectangle.origin.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinate of the upper left corner of the copied part of the respective input image.

Default: -1

Suggested values: -1, 0, 10, 20, 50, 100, 200, 300, 500

Col1Col1Col1col1col_1 (input_control)  rectangle.origin.x(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinate of the upper left corner of the copied part of the respective input image.

Default: -1

Suggested values: -1, 0, 10, 20, 50, 100, 200, 300, 500

Row2Row2Row2row2row_2 (input_control)  rectangle.corner.y(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Row coordinate of the lower right corner of the copied part of the respective input image.

Default: -1

Suggested values: -1, 0, 10, 20, 50, 100, 200, 300, 500

Col2Col2Col2col2col_2 (input_control)  rectangle.corner.x(-array) HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column coordinate of the lower right corner of the copied part of the respective input image.

Default: -1

Suggested values: -1, 0, 10, 20, 50, 100, 200, 300, 500

WidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the output image.

Default: 512

Suggested values: 32, 64, 128, 256, 512, 768, 1024, 2048, 4096

HeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the output image.

Default: 512

Suggested values: 32, 64, 128, 256, 512, 525, 1024, 2048, 4096

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

Result

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsettile_images_offset 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_imagestile_imagesTileImagesTileImagestile_images

See also

change_formatchange_formatChangeFormatChangeFormatchange_format, crop_partcrop_partCropPartCropPartcrop_part, crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1crop_rectangle1

Module

Foundation