machinevisiontoolbox.Image.nplanes
- property Image.nplanes
Number of color planes
- Returns:
Number of color planes
- Return type:
int
For a 2D or greyscale image this is one, otherwise it is the third dimension of the image.
Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Read('street.png') >>> img.nplanes 1 >>> img = Image.Read('flowers1.png') >>> img.nplanes 3