Function File: isind (img)

Return true if img is an indexed image.

A variable can be considered an indexed image if it is a non-sparse, real array of size MxNx1xK, and:

  • of class double with all integers above zero;
  • of class uint8 or uint16.

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: ind2gray, ind2rgb, isbw, isgray, isindex, isrgb.

Package: image