translate {EBImage}R Documentation

Image translation

Description

Translates an image.

Usage

  translate(x, v)

Arguments

x

An Image object or an array.

v

The translation vector or a matrix of translation vectors if x contains several images.

Details

Borders are repeated during translation.

Value

An Image object or an array, containing the translated version of x.

Author(s)

Gregoire Pau, gpau@ebi.ac.uk, 2008

See Also

resize, rotate

Examples

  x = readImage(system.file("images", "lena-color.png", package="EBImage"))
  y = translate(x, c(20,20))
  if (interactive()) {
    display(x, title='Lena')
    display(y, title='Translated lena')
  }

  ## gradient
  y = translate(x, c(1,1))
  if (interactive()) display(0.5+4*(y-x), title='NE gradient')

[Package EBImage version 3.10.0 Index]