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
Simon Garnier, garnier@njit.edu
Examples
img <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
img_rotated <- rotateScale(img, c(50, 50), 45, 1)