pyspark.ml.image.
_ImageSchema
Internal class for pyspark.ml.image.ImageSchema attribute. Meant to be private and not to be instantized. Use pyspark.ml.image.ImageSchema attribute to access the APIs of this class.
Methods
toImage(array[, origin])
toImage
Converts an array with metadata to a two-dimensional image.
toNDArray(image)
toNDArray
Converts an image to an array with metadata.
Attributes
columnSchema
Returns the schema for the image column.
imageFields
Returns field names of image columns.
imageSchema
Returns the image schema.
ocvTypes
Returns the OpenCV type mapping supported.
undefinedImageType
Returns the name of undefined image type for the invalid image.
Methods Documentation
numpy.ndarray
The array to convert to image.
Path to the image, optional.
Row
that is a two dimensional image.
New in version 2.3.0: ..
image: A row that contains the image to be converted. It should have the attributes specified in ImageSchema.imageSchema.
that is an image.
Attributes Documentation
StructType
a schema for image column, struct<origin:string, height:int, width:int, nChannels:int, mode:int, data:binary>.
struct<origin:string, height:int, width:int, nChannels:int, mode:int, data:binary>
New in version 2.4.0: ..
a list of field names.
with a single column of images named “image” (nullable) and having the same type returned by columnSchema().
columnSchema()
a dictionary containing the OpenCV type mapping supported.
New in version 2.3.0.