dsdl.geometry.media
Image
Bases: BaseGeometry
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/media.py
location
property
Returns:
Type | Description |
---|---|
The relative path of the current image. |
__init__(value, file_reader)
A Geometry class which abstracts an image object.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
The relative path of the current image object. |
required | |
file_reader |
The file reader object of the current image object. |
required |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/media.py
to_array()
Turn ImageMedia object to numpy.ndarray.
Returns:
Type | Description |
---|---|
The |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/media.py
to_bytes()
Turn ImageMedia object to bytes.
Returns:
Type | Description |
---|---|
The bytes of the current image. |
to_image()
Turn ImageMedia object to a PIL.Image
object.
Returns:
Type | Description |
---|---|
The |