im_rotate: Rotate an image

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Rotate an image

Usage

1
2
3
4
5
6
7
8
9
im_rotate(
  im,
  angle,
  expand = FALSE,
  cx = NULL,
  cy = NULL,
  interpolation = 2,
  pad = "zero"
)

Arguments

im

an image

angle

rotation angle in degrees

expand

either FALSE (default, does not change image size) or TRUE

cx

center of rotation along x

cy

center of rotation along y

interpolation

Type of interpolation. Either 0 (nearest), 1 (linear), or 2 (cubic).

pad

Type of padding. Either "zero", "neumann", or "repeat".

Value

an image

Examples

1
2
3
plot(im_rotate(regatta, 30))
plot(im_rotate(regatta, 30, expand = TRUE))
plot(im_rotate(regatta, 30, expand = TRUE, pad = "repeat"))

tsuda16k/noesis documentation built on Nov. 25, 2020, 10:16 a.m.