From: us on
"Ibtesam Saleh" <bossy_4me(a)yahoo.com> wrote in message <hvodim$b62$1(a)fred.mathworks.com>...
> > threshold = some_value; %Threshold that above is 1 below is 0
> > Igray = rgb2gray(Irgb); %Convert colors to gray
> > Ibw = Igray>threshold; %Set everything greater than threshold to 1 and less to 0.
> > Good luck
>
> Thanks Sean...
> but how can I select the best threshold value for my images?

a hint:
- requires the img proc tbx...

help imhist;

us