turicreate.Image¶
-
class
turicreate.
Image
(path=None, format='auto', **_Image__internal_kw_args)¶ A class whose objects contains image data, meta-data, and supports useful utility methods. This is intended to make image pre-processing easier for input into subsequent learning methods. Supports reading of JPEG and PNG formats.
Parameters: - path : string
The path of the location of the image file to be loaded into the Image object.
- format : {‘auto’ | ‘JPG’ | ‘PNG’}, optional
Defaults to ‘auto’. A format hint for the constructor. If left as ‘auto’, constructor tries to infer file format from file extension. Otherwise, tries to decode file as whatever the format hint suggests.
Examples
>>> img = turicreate.Image('https://static.turi.com/datasets/images/sample.jpg') >>> turicreate.SArray([img]).show()
Methods
Image.save (filename) |
Saves the image to a file system for later use. |
Image.show () |
Displays the image. |