Image Processing Toolbox | ![]() ![]() |
Return true for a binary image
Syntax
flag = isbw(A)
Description
flag = isbw(A)
returns 1 if A
is a binary image and 0 otherwise.
isbw
uses these criteria to decide if A
is a binary image:
A
is of class double
, all values must be either 0 or 1, the logical flag must be on, and the number of dimensions of A
must be 2.A
is of class uint8
, the logical flag must be on, and the number of dimensions of A
must be 2.A
is of class uint16
, it is not a binary image. (The toolbox does not support uint16
binary images.)Class Support
A
can be of class uint8
, uint16
, or double
.
See Also
![]() | iradon | isgray | ![]() |