Object

org.apache.spark.ml.image

ImageSchema

Related Doc: package image

Permalink

object ImageSchema

:: Experimental :: Defines the image schema and methods to read and manipulate images.

Annotations
@Experimental() @Since( "2.3.0" )
Source
ImageSchema.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ImageSchema
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val columnSchema: StructType

    Permalink

    Schema for the image column: Row(String, Int, Int, Int, Int, Array[Byte])

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getData(row: Row): Array[Byte]

    Permalink

    Gets the image data

    Gets the image data

    returns

    The image data

  12. def getHeight(row: Row): Int

    Permalink

    Gets the height of the image

    Gets the height of the image

    returns

    The height of the image

  13. def getMode(row: Row): Int

    Permalink

    Gets the OpenCV representation as an int

    Gets the OpenCV representation as an int

    returns

    The OpenCV representation as an int

  14. def getNChannels(row: Row): Int

    Permalink

    Gets the number of channels in the image

    Gets the number of channels in the image

    returns

    The number of channels in the image

  15. def getOrigin(row: Row): String

    Permalink

    Gets the origin of the image

    Gets the origin of the image

    returns

    The origin of the image

  16. def getWidth(row: Row): Int

    Permalink

    Gets the width of the image

    Gets the width of the image

    returns

    The width of the image

  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. val imageFields: Array[String]

    Permalink
  19. val imageSchema: StructType

    Permalink

    DataFrame with a single column of images named "image" (nullable)

  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. val javaOcvTypes: Map[String, Int]

    Permalink

    (Java-specific) OpenCV type mapping supported

  22. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. val ocvTypes: Map[String, Int]

    Permalink

    (Scala-specific) OpenCV type mapping supported

  26. def readImages(path: String, sparkSession: SparkSession, recursive: Boolean, numPartitions: Int, dropImageFailures: Boolean, sampleRatio: Double, seed: Long): DataFrame

    Permalink

    Read the directory of images from the local or remote source

    Read the directory of images from the local or remote source

    path

    Path to the image directory

    sparkSession

    Spark Session, if omitted gets or creates the session

    recursive

    Recursive path search flag

    numPartitions

    Number of the DataFrame partitions, if omitted uses defaultParallelism instead

    dropImageFailures

    Drop the files that are not valid images from the result

    sampleRatio

    Fraction of the files loaded

    returns

    DataFrame with a single column "image" of images; see ImageSchema for the details

    Note

    If sample ratio is less than 1, sampling uses a PathFilter that is efficient but potentially non-deterministic.

    ,

    If multiple jobs are run in parallel with different sampleRatio or recursive flag, there may be a race condition where one job overwrites the hadoop configs of another.

  27. def readImages(path: String): DataFrame

    Permalink

    Read the directory of images from the local or remote source

    Read the directory of images from the local or remote source

    path

    Path to the image directory

    returns

    DataFrame with a single column "image" of images; see ImageSchema for the details

    Note

    If sample ratio is less than 1, sampling uses a PathFilter that is efficient but potentially non-deterministic.

    ,

    If multiple jobs are run in parallel with different sampleRatio or recursive flag, there may be a race condition where one job overwrites the hadoop configs of another.

  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  30. val undefinedImageType: String

    Permalink
  31. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Members