loadImages | R Documentation |
This function loads images from disk to R, where one can inspect them and then pass them on to imagesToKerasInput
, which converts them to input for keras (TensorFlow) models.
loadImages(
imageDir,
fileNames,
pattern,
patternInclude = TRUE,
imageFormats = c("JPG|TIF|PNG|JPEG|TIFF")
)
imageDir |
character. Directory containing the images to load |
fileNames |
character. File names to load (they will still be filtered by |
pattern |
character. Pattern to search in file names |
patternInclude |
logical. Include images with pattern in file names (TRUE) or exclude (FALSE) |
imageFormats |
character. Image file formats to read. |
A list with 2 slots: "img" contains images as a tibble, "info" contains basic information about the images.
# Example 1: Canopy
wd_images_can <- system.file("images/canopy/resized",
package = "imageseg")
images_can <- loadImages(imageDir = wd_images_can)
images_can
# Example 2: Understory
wd_images_us <- system.file("images/understory/resized",
package = "imageseg")
images_us <- loadImages(imageDir = wd_images_us)
images_us
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.