transpose | R Documentation |
Transposes an image by swapping its spatial dimensions.
transpose(x)
x |
an |
The transposition of an image is performed by swapping the X and Y indices of its array representation.
A transformed version of x
with its first two dimensions transposed.
The function is implemented using an efficient cash-oblivious algorithm which is typically faster than R's aperm
and t
functions.
Andrzej Oles, andrzej.oles@embl.de, 2012-2017
flip
, flop
, rotate
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.