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])
Converts an array with metadata to a two-dimensional image.
toNDArray
(image)
Converts an image to an array with metadata.
Attributes
Methods Documentation
toImage
(array: numpy.ndarray, origin: str = '') → pyspark.sql.types.Row¶
Converts an array with metadata to a two-dimensional image.
numpy.ndarray
The array to convert to image.
Path to the image, optional.
Row
that is a two dimensional image.
toNDArray
(image: pyspark.sql.types.Row) → numpy.ndarray¶
Converts an image to an array with metadata.
Row
image: A row that contains the image to be converted. It should have the attributes specified in ImageSchema.imageSchema.
numpy.ndarray
that is an image.
Attributes Documentation
columnSchema
¶
Returns the schema for the image column.
StructType
a schema for image column, struct<origin:string, height:int, width:int, nChannels:int, mode:int, data:binary>
.
imageFields
¶
Returns field names of image columns.
a list of field names.
imageSchema
¶
Returns the image schema.
StructType
with a single column of images named âimageâ (nullable) and having the same type returned by columnSchema()
.
ocvTypes
¶
Returns the OpenCV type mapping supported.
a dictionary containing the OpenCV type mapping supported.
undefinedImageType
¶
Returns the name of undefined image type for the invalid image.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4