Image.dtype#

property Image.dtype: dtype[source]#

Datatype of image

Returns:

NumPy datatype of image

Return type:

numpy.dtype

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Read('flowers1.png')
>>> img.dtype
dtype('uint8')
>>> img = Image.Read('flowers1.png', dtype='float32')
>>> img.dtype
dtype('float32')
Seealso:

to to_int to_float like cast numpy.dtype