powered by
This function takes an image and augments it by rotating it multiple times.
image_augment( img, pattern = NULL, times = 12, type = "export", dir_original = NULL, dir_processed = NULL, parallel = FALSE, verbose = TRUE )
If type is "export," augmented images are saved. If type is "return," a list of augmented images is returned.
An Image object.
Image
A regular expression pattern to select multiple images from a directory.
The number of times to rotate the image.
The type of output: "export" to save images or "return" to return a list of augmented images.
The directory where original images are located.
The directory where processed images will be saved.
Whether to perform image augmentation in parallel.
Whether to display progress messages.
if(interactive()){ library(pliman) img <- image_pliman("sev_leaf.jpg") imgs <- image_augment(img, type = "return", times = 4) image_combine(imgs) }
Run the code above in your browser using DataLab