isgray
Returns true if the given image, x, is grayscale.
Syntax
R = isgray(x)
Inputs
- x
- Name of the image file, 2D or ND non-sparse matrix.
Outputs
- R
- Returns true if x is grayscale and false otherwise.
Examples
Checks if an image file is grayscale:
R = isgray('test.bmp')
R = 1