object ImageSchema
:: Experimental :: Defines the image schema and methods to read and manipulate images.
- Annotations
- @Experimental() @Since( "2.3.0" )
- Alphabetic
- By Inheritance
- ImageSchema
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
val
columnSchema: StructType
Schema for the image column: Row(String, Int, Int, Int, Int, Array[Byte])
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getData(row: Row): Array[Byte]
Gets the image data
Gets the image data
- returns
The image data
-
def
getHeight(row: Row): Int
Gets the height of the image
Gets the height of the image
- returns
The height of the image
-
def
getMode(row: Row): Int
Gets the OpenCV representation as an int
Gets the OpenCV representation as an int
- returns
The OpenCV representation as an int
-
def
getNChannels(row: Row): Int
Gets the number of channels in the image
Gets the number of channels in the image
- returns
The number of channels in the image
-
def
getOrigin(row: Row): String
Gets the origin of the image
Gets the origin of the image
- returns
The origin of the image
-
def
getWidth(row: Row): Int
Gets the width of the image
Gets the width of the image
- returns
The width of the image
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val imageFields: Array[String]
-
val
imageSchema: StructType
DataFrame with a single column of images named "image" (nullable)
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
javaOcvTypes: Map[String, Int]
(Java-specific) OpenCV type mapping supported
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
ocvTypes: Map[String, Int]
(Scala-specific) OpenCV type mapping supported
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- val undefinedImageType: String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
Deprecated Value Members
-
def
readImages(path: String, sparkSession: SparkSession, recursive: Boolean, numPartitions: Int, dropImageFailures: Boolean, sampleRatio: Double, seed: Long): DataFrame
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
- Annotations
- @deprecated
- Deprecated
(Since version 2.4.0)
- Note
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.
,If sample ratio is less than 1, sampling uses a PathFilter that is efficient but potentially non-deterministic.
-
def
readImages(path: String): DataFrame
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
- Annotations
- @deprecated
- Deprecated
(Since version 2.4.0)
- Note
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.
,If sample ratio is less than 1, sampling uses a PathFilter that is efficient but potentially non-deterministic.