Image Processing Toolbox | ![]() ![]() |
Return true for intensity image
Syntax
Description
flag = isgray(A)
returns 1 if A
is a grayscale intensity image and 0 otherwise.
isgray
uses these criteria to decide if A
is an intensity image:
A
is of class double
, all values must be in the range [0,1], and the number of dimensions of A
must be 2.
A
is of class uint16
or uint8
, the number of dimensions of A
must be 2.
Class Support
The input image, A
, can be of class logical
, uint8
, uint16
, or double
.
See Also
![]() | isflat | isind | ![]() |