View source: R/utils_objects.R
image_augment | R Documentation |
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
)
img |
An |
pattern |
A regular expression pattern to select multiple images from a directory. |
times |
The number of times to rotate the image. |
type |
The type of output: "export" to save images or "return" to return a list of augmented images. |
dir_original |
The directory where original images are located. |
dir_processed |
The directory where processed images will be saved. |
parallel |
Whether to perform image augmentation in parallel. |
verbose |
Whether to display progress messages. |
If type is "export," augmented images are saved. If type is "return," a list of augmented images is returned.
if(interactive()){
library(pliman)
img <- image_pliman("sev_leaf.jpg")
imgs <- image_augment(img, type = "return", times = 4)
image_combine(imgs)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.