Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

transpose

Image Transposition


Description

Transposes an image by swapping its spatial dimensions.

Usage

transpose(x)

Arguments

x

an Image object or an array.

Details

The transposition of an image is performed by swapping the X and Y indices of its array representation.

Value

A transformed version of x with its first two dimensions transposed.

Note

The function is implemented using an efficient cash-oblivious algorithm which is typically faster than R's aperm and t functions.

Author(s)

Andrzej Oles, andrzej.oles@embl.de, 2012-2017

See Also

Examples

x = readImage(system.file("images", "sample-color.png", package="EBImage"))
  y = transpose(x)
  
  display(x, title='Original')
  display(y, title='Transposed')

  ## performing the transposition of an image twice should result in the original image
  z = transpose(y)
  identical(x, z)

EBImage

Image processing and analysis toolbox for R

v4.32.0
LGPL
Authors
Andrzej Oleś, Gregoire Pau, Mike Smith, Oleg Sklyar, Wolfgang Huber, with contributions from Joseph Barry and Philip A. Marais
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.