dsdl.geometry.shape
ImageShape
Bases: Shape
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/shape.py
height
property
Returns:
Type | Description |
---|---|
The height of the image. |
width
property
Returns:
Type | Description |
---|---|
The width of the image. |
__init__(value, mode='hw')
A Geometry class which abstracts an image's shape.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
A list which contains the width and height of the image. |
required | |
mode |
The shape mode, value should be |
'hw'
|
Attributes:
Name | Type | Description |
---|---|---|
_width(int) |
The width of the image. |
|
_height(int) |
The height of the image. |
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/shape.py
Shape
Bases: BaseGeometry
Source code in /Users/bin/anaconda3/envs/dsdl/lib/python3.10/site-packages/dsdl/geometry/shape.py
media_type
property
Returns:
Type | Description |
---|---|
The media type of the current Shape object. |
mode
property
Returns:
Type | Description |
---|---|
The mode of the shape. |
value
property
Returns:
Type | Description |
---|---|
The shape value. |
__init__(value, mode, media)
A Geometry class which abstracts a media's shape.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
A list which contains the shape information of the media. |
required | |
mode |
The shape mode, which represents the format of media'shape. For Exsample, an image shape's mode can be "hw" or "wh". |
required | |
media |
The media type, such as "image", "video" and so on. |
required |
Attributes:
Name | Type | Description |
---|---|---|
_value(list[int]) |
The shape value of the media. |
|
_media_type(str) |
The type of the media. |
|
_mode(str) |
The mode of the media's shape. |