translate: Linear Spatial Translation

translateR Documentation

Linear Spatial Translation

Description

Replacement for EBImage function that accepts lists

Usage

translate(x, v, filter = c("bilinear", "none"), ...)

Arguments

x

An Image object or array or list of the same.

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 "none" or the default, which has been changed to "bilinear".

...

Arguments to be passed to affine in the EBImage package, such as filter, output.dim, bg.col or antialias.

Details

This function is a replacement for the EBImage code of the same name.

Examples


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)


ornelles/virustiter documentation built on March 29, 2024, 8:30 p.m.