Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!newsfeed00.sul.t-online.de!t-online.de!news.k-dsl.de!aioe.org!not-for-mail
From: Vicky <bonsai19@gmx.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how can I label segmented images
Date: Fri, 31 Oct 2008 14:03:37 +0100
Organization: Aioe.org NNTP Server
Lines: 71
Message-ID: <geevn9$s8t$1@aioe.org>
References: <gea0gi$nq2$1@aioe.org> <1d3ccafc-fd44-49cc-b289-f8c5f322f641@t42g2000hsg.googlegroups.com> 	<geephe$5m2$1@aioe.org> <45e80e7d-08ae-4b57-b846-e656ae560989@s9g2000prm.googlegroups.com>
NNTP-Posting-Host: cuZI2+5VfLMdq7mLsEU2FQ.user.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
NNTP-Posting-Date: Fri, 31 Oct 2008 13:03:37 +0000 (UTC)
X-Notice: Filtered by postfilter v. 0.7.4
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
Xref: news.mathworks.com comp.soft-sys.matlab:498233


Hallo ImageAnalyst,

it's a good idea to copy each color out. Then every color get an label. 
The background is 0 and the colored object get the label 1. The object 
get the label 1 in each seperated image. If I bring the sepearted images 
together again (with an image addition) all the objects have the label 
1. And so I can't distinguish the different colors.

Or do I understand it wrong?

Best regards,
Vicky


ImageAnalyst schrieb:
> On Oct 31, 7:18 am, 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 value.
>>
>> 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.  In 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