This image data source is used to load image files from a directory, it can load compressed image (jpeg, png, etc.) into raw image representation via ImageIO in Java library. The loaded DataFrame has one StructType column: “image”, containing image data stored as image schema.
The schema of the image column is:
origin:
StringType (represents the file path of the image)
height:
IntegerType (height of the image)
width:
IntegerType (width of the image)
nChannels:
IntegerType (number of image channels)
mode:
IntegerType (OpenCV-compatible type)
data:
BinaryType (Image bytes in OpenCV-compatible order: row-wise BGR in most cases)