rotateScale: Image Rotation and Scaling

View source: R/transform.R

rotateScaleR Documentation

Image Rotation and Scaling

Description

rotateScale rotates (clockwise) and scales an image using the warpAffine function.

Usage

rotateScale(
  image,
  center = (dim(image)[2:1] - 1)/2,
  angle = 90,
  scale = 1,
  ...
)

Arguments

image

An Image object.

center

A 2-elements vector indicating the location (row, column) of the center of the rotation in the source image. It defaults to the center of the image.

angle

A numeric value indicating the rotation angle in degrees (default: 90).

scale

A numeric value indicating an isotropic scale factor (default: 1).

...

Additional parameters for the warpAffine function.

Value

An Image object.

Author(s)

Simon Garnier, garnier@njit.edu

See Also

warpAffine

Examples

img <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
img_rotated <- rotateScale(img, c(50, 50), 45, 1)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.