machinevisiontoolbox.Image.ndim

property Image.ndim

Number of image array dimensions

Returns:

number of image dimensions

Return type:

int

Example:

>>> from machinevisiontoolbox import Image
>>> img = Image.Read('flowers1.png')
>>> img.ndim
3
>>> img = Image.Read('street.png')
>>> img.ndim
2
Seealso:

nplanes shape