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.
(float or int): rotation angle value in degrees, counter-clockwise.
(sequence of int) – horizontal and vertical translations (post-rotation translation)
(float) – overall scale
(float or sequence) – shear angle value in degrees between -180 to 180, clockwise direction. If a sequence 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.
(int 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.
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()