Angular rotation of an image
transform_rotate(
img,
angle,
interpolation = 0,
expand = FALSE,
center = NULL,
fill = NULL,
resample
)A magick-image, array or torch_tensor.
(numeric): Rotation angle value in degrees, counter-clockwise.
(integer, optional): Interpolation mode. 0 for
nearest, 2 for bilinear. Default is 0 (nearest).
(logical, optional): Optional expansion flag. If TRUE,
expands the output to make it large enough to hold the entire rotated
image. If FALSE or omitted, make the output image the same size as the
input image. Note that the expand flag assumes rotation around the center
and no translation.
(numeric vector of length 2, optional): Optional center of
rotation, c(x, y). Origin is the upper left corner. Default is the
center of the image.
(numeric vector or numeric): Pixel fill value for area outside
the rotated image. If a single numeric value, the value is used for all
channels. Defaults to 0 for all channels. This option is not supported for Tensor input. Fill
value for the area outside the transform in the output image is always 0.
Deprecated. Use interpolation instead.
Other unitary_transforms:
transform_adjust_brightness(),
transform_adjust_contrast(),
transform_adjust_gamma(),
transform_adjust_hue(),
transform_adjust_saturation(),
transform_affine(),
transform_center_crop(),
transform_convert_image_dtype(),
transform_crop(),
transform_grayscale(),
transform_hflip(),
transform_linear_transformation(),
transform_normalize(),
transform_pad(),
transform_perspective(),
transform_resize(),
transform_rgb_to_grayscale(),
transform_to_tensor(),
transform_vflip()