Prev: get a mean of indexed data without using for loop
Next: Why in one axes can exist two image object?
From: Ibtesam Saleh on 20 May 2010 09:15 What the steps to do that? is convert it directly to binary OR convert it to gray then to binary? I have confused I want black/white image I try img= im2bw(imageName); but it is became gray scale not black/white Please help me with the steps to get binary image from colored one Ibtesam
From: Sean on 20 May 2010 09:46 "Ibtesam Saleh" <bossy_4me(a)yahoo.com> wrote in message <ht3cla$3e8$1(a)fred.mathworks.com>... > What the steps to do that? is convert it directly to binary OR convert it to gray then to binary? > I have confused I want black/white image > I try > img= im2bw(imageName); > but it is became gray scale not black/white > Please help me with the steps to get binary image from colored one > > Ibtesam -"Gray" it (rgb2gray) -Pick a threshold -Ibw = Igray > threshold;
From: Ibtesam Saleh on 20 May 2010 10:32 > -"Gray" it (rgb2gray) > -Pick a threshold > -Ibw = Igray > threshold; thanks sean for quick response, are you mean like this: gray= rgb2gray(image); bw= im2bw(gray); I don't know what is the second and third steps mean?
From: Ibtesam Saleh on 20 May 2010 10:41 how pick the suitable threshold? I did as you advise me.. Igray= rgb2gray(img); threshold= 70; Ibw= Igray> threshold;
From: Royi Avital on 20 May 2010 10:47 "Ibtesam Saleh" <bossy_4me(a)yahoo.com> wrote in message <ht3h5k$53e$1(a)fred.mathworks.com>... > > -"Gray" it (rgb2gray) > > -Pick a threshold > > -Ibw = Igray > threshold; > > thanks sean for quick response, are you mean like this: > gray= rgb2gray(image); > bw= im2bw(gray); > > I don't know what is the second and third steps mean? > Once you have a gray image you must chose a threshold. A value which above it all pixels will be assigned to 1 and beneath to 0. You may do that in various ways. In my example, I is a gray scale image: Threshold = 128; I(I < 128) = 0; I(I >= 128) = 1; % Pay attention to the order I = logical(I); % Casting I hope that helps.
|
Next
|
Last
Pages: 1 2 Prev: get a mean of indexed data without using for loop Next: Why in one axes can exist two image object? |