Package org.apache.spark.ml.image
Class ImageSchema
Object
org.apache.spark.ml.image.ImageSchema
Defines the image schema and methods to read and manipulate images.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic StructType
Schema for the image column: Row(String, Int, Int, Int, Int, Array[Byte])static byte[]
Gets the image datastatic int
Gets the height of the imagestatic int
Gets the OpenCV representation as an intstatic int
getNChannels
(Row row) Gets the number of channels in the imagestatic String
Gets the origin of the imagestatic int
Gets the width of the imagestatic String[]
static StructType
DataFrame with a single column of images named "image" (nullable)(Java-specific) OpenCV type mapping supportedocvTypes()
(Scala-specific) OpenCV type mapping supportedstatic String
-
Constructor Details
-
ImageSchema
public ImageSchema()
-
-
Method Details
-
undefinedImageType
-
ocvTypes
(Scala-specific) OpenCV type mapping supported- Returns:
- (undocumented)
-
javaOcvTypes
(Java-specific) OpenCV type mapping supported- Returns:
- (undocumented)
-
columnSchema
Schema for the image column: Row(String, Int, Int, Int, Int, Array[Byte])- Returns:
- (undocumented)
-
imageFields
-
imageSchema
DataFrame with a single column of images named "image" (nullable)- Returns:
- (undocumented)
-
getOrigin
Gets the origin of the image- Parameters:
row
- (undocumented)- Returns:
- The origin of the image
-
getHeight
Gets the height of the image- Parameters:
row
- (undocumented)- Returns:
- The height of the image
-
getWidth
Gets the width of the image- Parameters:
row
- (undocumented)- Returns:
- The width of the image
-
getNChannels
Gets the number of channels in the image- Parameters:
row
- (undocumented)- Returns:
- The number of channels in the image
-
getMode
Gets the OpenCV representation as an int- Parameters:
row
- (undocumented)- Returns:
- The OpenCV representation as an int
-
getData
Gets the image data- Parameters:
row
- (undocumented)- Returns:
- The image data
-