Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!s9g2000prm.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how can I label segmented images
Date: Fri, 31 Oct 2008 05:35:44 -0700 (PDT)
Organization: http://groups.google.com
Lines: 65
Message-ID: <45e80e7d-08ae-4b57-b846-e656ae560989@s9g2000prm.googlegroups.com>
References: <gea0gi$nq2$1@aioe.org> <1d3ccafc-fd44-49cc-b289-f8c5f322f641@t42g2000hsg.googlegroups.com> 
	<geephe$5m2$1@aioe.org>
NNTP-Posting-Host: 192.44.136.113
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1225456544 21598 127.0.0.1 (31 Oct 2008 12:35:44 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 31 Oct 2008 12:35:44 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: s9g2000prm.googlegroups.com; posting-host=192.44.136.113; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 
	3.5.21022),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 bdci2px (NetCache NetApp/6.0.7)
Xref: news.mathworks.com comp.soft-sys.matlab:498229


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