imtile

Combines several images into one tiled image.

Category: Graphics > Images

Syntax

T = imtile(frames)

Tiles the images in a multi-frame array (an m-by-n-by-k or m-by-n-by-3-by-k array) into a grid.

T = imtile(cellOfImages)

Tiles images given in a cell array.

T = imtile(___, 'GridSize', [r c])

Fixes the number of rows and columns of the grid.

Description

Without a GridSize, the grid is chosen to be close to square. Tiles are placed row by row. Use it to compare results side by side, for example the same image after different filters, in a single imshow call.

Input arguments

frames
Image stack or cell array of images of the same class.
'GridSize'
Two-element vector [rows cols].

Output arguments

T
The tiled image. Unused cells in the grid are filled with background.

Example

Two tiles side by side

a = uint8(ones(2));
b = uint8(zeros(2));
T = imtile({a, b}, 'GridSize', [1 2])
Output
T = 2×4 uint8 matrix

   1   1   0   0
   1   1   0   0

See also

imshow cat imresize