R/transforms-generics.R
transform_affine.RdApply affine transformation on an image keeping image center invariant
transform_affine(
img,
angle,
translate,
scale,
shear,
interpolation = 0,
fill = NULL,
resample,
fillcolor,
center = NULL
)A magick-image, array or torch_tensor.
(numeric): Rotation angle value in degrees, counter-clockwise.
(integer vector of length 2): Horizontal and vertical translations (post-rotation translation).
(numeric): Overall scale.
(numeric vector or numeric): Shear angle value in degrees
between -180 to 180, clockwise direction. If a numeric vector is
specified, the first value corresponds to a shear parallel to the x-axis,
while the second value corresponds to a shear parallel to the y-axis.
(integer or character): Interpolation mode.
Supported values are 0 / "nearest" and 2 / "bilinear". Default
is 0.
Fill color for area outside the transform. Default is NULL.
Deprecated. Use interpolation instead.
Deprecated. Use fill instead.
(numeric vector of length 2, optional): Optional center of
rotation, c(x, y). Default is image center.
Other unitary_transforms:
transform_adjust_brightness(),
transform_adjust_contrast(),
transform_adjust_gamma(),
transform_adjust_hue(),
transform_adjust_saturation(),
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_rotate(),
transform_to_tensor(),
transform_vflip()