translate | R Documentation |
Replacement for EBImage
function that accepts lists
translate(x, v, filter = c("bilinear", "none"), ...)
x |
An |
v |
A vector of 2 numbers denoting the translation vector in pixels or a list of the same. |
filter |
A character string indicating the interpolating
sampling filter. Valid values are |
... |
Arguments to be passed to |
This function is a replacement for the EBImage code of the same name.
x <- readImage(system.file("images", "sample-color.png", package = "EBImage"))
y <- untile(x, c(4, 4), lwd = 0)
plot(y, all = TRUE, nx = 4)
v <- sample(-20:20, 4*4*2, replace = TRUE)
v <- split(v, gl(4*4, 2)) # 16 pairs of translations
plot(translate(y, v), all = TRUE, nx = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.