Given a sequence of frames, tile generates a single image with frames tiled.
untile is the inverse function and divides an image into a sequence of images.
## make a set of blurred images
img = readImage(system.file("images", "sample-color.png", package="EBImage"))[257:768,,]
x = resize(img, 128, 128)
xt = list()
for (t in seq(0.1, 5, len=9)) xt=c(xt, list(gblur(x, s=t)))
xt = combine(xt)
display(xt, title='Blurred images')
## tile
xt = tile(xt, 3)
display(xt, title='Tiles')
## untile
xu = untile(img, c(3, 3))
display(xu, title='Blocks')
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(EBImage)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/EBImage/tile.Rd_%03d_medium.png", width=480, height=480)
> ### Name: tile
> ### Title: Tiling/untiling images
> ### Aliases: tile untile
> ### Keywords: manip
>
> ### ** Examples
>
> ## make a set of blurred images
> img = readImage(system.file("images", "sample-color.png", package="EBImage"))[257:768,,]
> x = resize(img, 128, 128)
> xt = list()
> for (t in seq(0.1, 5, len=9)) xt=c(xt, list(gblur(x, s=t)))
> xt = combine(xt)
> display(xt, title='Blurred images')
Only the first frame of the image stack is displayed.
To display all frames use 'all = TRUE'.
>
> ## tile
> xt = tile(xt, 3)
> display(xt, title='Tiles')
>
> ## untile
> xu = untile(img, c(3, 3))
> display(xu, title='Blocks')
Only the first frame of the image stack is displayed.
To display all frames use 'all = TRUE'.
>
>
>
>
>
> dev.off()
null device
1
>