Class ImageSchema

Object
org.apache.spark.ml.image.ImageSchema

public class ImageSchema extends Object
Defines the image schema and methods to read and manipulate images.
  • Constructor Details

    • ImageSchema

      public ImageSchema()
  • Method Details

    • undefinedImageType

      public static String undefinedImageType()
    • ocvTypes

      public static scala.collection.immutable.Map<String,Object> ocvTypes()
      (Scala-specific) OpenCV type mapping supported
      Returns:
      (undocumented)
    • javaOcvTypes

      public static Map<String,Object> javaOcvTypes()
      (Java-specific) OpenCV type mapping supported
      Returns:
      (undocumented)
    • columnSchema

      public static StructType columnSchema()
      Schema for the image column: Row(String, Int, Int, Int, Int, Array[Byte])
      Returns:
      (undocumented)
    • imageFields

      public static String[] imageFields()
    • imageSchema

      public static StructType imageSchema()
      DataFrame with a single column of images named "image" (nullable)
      Returns:
      (undocumented)
    • getOrigin

      public static String getOrigin(Row row)
      Gets the origin of the image

      Parameters:
      row - (undocumented)
      Returns:
      The origin of the image
    • getHeight

      public static int getHeight(Row row)
      Gets the height of the image

      Parameters:
      row - (undocumented)
      Returns:
      The height of the image
    • getWidth

      public static int getWidth(Row row)
      Gets the width of the image

      Parameters:
      row - (undocumented)
      Returns:
      The width of the image
    • getNChannels

      public static int getNChannels(Row row)
      Gets the number of channels in the image

      Parameters:
      row - (undocumented)
      Returns:
      The number of channels in the image
    • getMode

      public static int getMode(Row row)
      Gets the OpenCV representation as an int

      Parameters:
      row - (undocumented)
      Returns:
      The OpenCV representation as an int
    • getData

      public static byte[] getData(Row row)
      Gets the image data

      Parameters:
      row - (undocumented)
      Returns:
      The image data