ClassesClasses | | Operators

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffset (Operator)

Name

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffset — 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)

Description

tile_images_offsettile_images_offsetTileImagesOffsetTileImagesOffsetTileImagesOffset 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 TiledImageTiledImageTiledImageTiledImagetiledImage 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 OffsetRowOffsetRowOffsetRowOffsetRowoffsetRow and OffsetColOffsetColOffsetColOffsetColoffsetCol. 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 Row1Row1Row1Row1row1, Col1Col1Col1Col1col1, Row2Row2Row2Row2row2, and Col2Col2Col2Col2col2 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 OffsetRowOffsetRowOffsetRowOffsetRowoffsetRow and OffsetColOffsetColOffsetColOffsetColoffsetCol 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 TiledImageTiledImageTiledImageTiledImagetiledImage 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_imagesTileImagesTileImagesTileImages usually will be slightly faster.

Execution Information

Parameters

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

Input images.

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

Tiled output image.

OffsetRowOffsetRowOffsetRowOffsetRowoffsetRow (input_control)  point.y(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: 0

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

OffsetColOffsetColOffsetColOffsetColoffsetCol (input_control)  point.x(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: 0

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

Row1Row1Row1Row1row1 (input_control)  rectangle.origin.y(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: -1

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

Col1Col1Col1Col1col1 (input_control)  rectangle.origin.x(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: -1

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

Row2Row2Row2Row2row2 (input_control)  rectangle.corner.y(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: -1

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

Col2Col2Col2Col2col2 (input_control)  rectangle.corner.x(-array) HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

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

Default value: -1

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

WidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Width of the output image.

Default value: 512

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

HeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Height of the output image.

Default value: 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_offsetTileImagesOffsetTileImagesOffsetTileImagesOffset 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>)SetSystem("no_object_result",<Result>). If necessary, an exception is raised.

Possible Predecessors

append_channelappend_channelAppendChannelAppendChannelAppendChannel

Alternatives

tile_channelstile_channelsTileChannelsTileChannelsTileChannels, tile_imagestile_imagesTileImagesTileImagesTileImages

See also

change_formatchange_formatChangeFormatChangeFormatChangeFormat, crop_partcrop_partCropPartCropPartCropPart, crop_rectangle1crop_rectangle1CropRectangle1CropRectangle1CropRectangle1

Module

Foundation


ClassesClasses | | Operators