Return true if img is a grayscale image.
A variable can be considered a grayscale image if it is a non-sparse, real array of size MxNx1xK, and:
Note: despite their suggestive names, the functions isbw, isgray, isind, and isrgb, are ambiguous since it is not always possible to distinguish between those image types. For example: an uint8 matrix can be both a grayscale and indexed image; a grayscale image may have values outside the range [0 1]. They are good to dismiss input as an invalid image type, but not for identification.
See also: gray2ind, isbw, isind, isrgb.
Package: image