Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: how to draw thin line between different color regions?
Date: Tue, 27 Jan 2009 14:16:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 70
Message-ID: <gln4v1$gfg$1@fred.mathworks.com>
References: <gea0gi$nq2$1@aioe.org> <1d3ccafc-fd44-49cc-b289-f8c5f322f641@t42g2000hsg.googlegroups.com> <45e80e7d-08ae-4b57-b846-e656ae560989@s9g2000prm.googlegroups.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1233065761 16880 172.30.248.37 (27 Jan 2009 14:16:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Jan 2009 14:16:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1619680
Xref: news.mathworks.com comp.soft-sys.matlab:514233


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <45e80e7d-08ae-4b57-b846-e656ae560989@s9g2000prm.googlegroups.com>...
> On Oct 31, 7:18=A0am, Vicky <bonsa...@gmx.de> wrote:
> > Hallo ImageAnalyst,
> >
> > thank you very much for your help.
> > Now I have still a question.
> > My segmented images are so created that different colors are directly
> > next to each other. So for example between two colors is not a black
> > area. So if I use bwlabel() it makes one object of these two colors. But
> > this is not what I want. Each color should become a different integer val=
> ue.
> >
> > bwlabel()returns a matrix, where each pixel get an integer value. The
> > pixels labeled 0 are the background, the pixels labeled 1 is an object
> > and so on.
> >
> > Is it possible to label the pixels with an integer value that I define?
> > Or can't I persuade the labels?
> >
> > Best regards,
> > Vicky
> >
> > ImageAnalyst schrieb:
> >
> >
> >
> > > On Oct 29, 11:46 am, Vicky <bonsa...@gmx.de> wrote:
> > >> Hi there,
> >
> > >> I'll be grateful if someone can help me out.
> >
> > >> I have segmented bmp-images. Now I want to label (mark) each pixel of
> > >> each image, so that pixel with the same color (rgb) become the same
> > >> label. The label have to be an integer value.
> >
> > >> Is it possible to label an segmented image?
> >
> > >> How can I realize it?
> >
> > >> I think the marker-based watershed segmentation is such a thing that I
> > >> need. But I have already segmented images.
> >
> > >> Best regards
> > >> Vicky
> >
> > > ----------------------------------------------------------------------
> > > Vicky:
> > > You need the image processing toolkit. =A0In there, there is a function
> > > called bwlabel() that does what you want.
> > > Regards,
> > > ImageAnalyst- Hide quoted text -
> >
> > - Show quoted text -
> 
> -------------------------------------------------------------------------
> Vicky:
> First you have to get a binary image that bwlabel can label.  bwlabel
> requires that the objects it labels NOT BE TOUCHING.  If you can't
> draw a thin line between the objects (e.g. by erosion) because it
> might affect your areas, then I think your only recourse is to copy
> each color out to a separate image and then label those.  It looks
> like you might have to do that (it's not hard - just one line of code
> per color) since you have colored objects that are in contact with
> each other.
> Regards,
> ImageAnalyst
I have a colored image and I want to lables the pixels of each color region. Actually I met similar problem as mentioned above, but I don't know how to use imerode to draw this thin line between different color regions? I've tried it but I couldn't get those regions separated.

Thanks,