MATLAB: How from uint8 to 0 and 1

greyscaleuint8

I import the following image which is a [583x673x3] uint8 :
and i would like the convert the grey/black color to origianally black.How it can be ?

Best Answer

Igray = rgb2gray(I);
BW = im2bw(Igray,graythresh(Igray));
imshow(BW)