We will begin by using the following steps:
- First, we load all the libraries that we will use. We will use just one function from each of these libraries but we need each one to get our data in the proper format. The jpeg library will be used to read in the image data and store it as a matrix. The purrr package will be used to apply a function to our list of arrays. The abind package will be used to convert the list of arrays into one array. Finally, OpenImageR will be used to resize our data. We load all the libraries needed to bring in images and convert them to the proper format using the following code:
library(jpeg) library(purrr) library(abind) library(OpenImageR)
- After loading the libraries, ...