isbw

Returns true if the given image, x, has only black and white colors.

Syntax

R = isbw(x)

Inputs

x
Name of the image file, 2D or ND non-sparse matrix.
Type: string | mat

Outputs

R
Returns true if x is black and white and false otherwise.
Type: logical

Examples

Checks if an image file is only in black and white:
R = isbw('test.bmp')
R = 1