Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to draw thin line between different color regions?
Date: Wed, 28 Jan 2009 10:19:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 11
Message-ID: <glpbel$5cr$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> <gln4v1$gfg$1@fred.mathworks.com> <b5e9ea4f-23df-486d-b0dc-aceb63c984bc@w24g2000prd.googlegroups.com> <KAHfl.39892$zr6.19233@newsfe03.iad> <glnh70$ob0$1@fred.mathworks.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 1233137941 5531 172.30.248.37 (28 Jan 2009 10:19:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 28 Jan 2009 10:19:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1619680
Xref: news.mathworks.com comp.soft-sys.matlab:514435


"Image Analyst" <imageanalyst@mailinator.com> wrote in message <glnh70$ob0$1@fred.mathworks.com>...
> I thought the colors were in the labeled image, but maybe they're in the original image.  If he doesn't yet have the labeled image, but has only the binary image, then he can try to use watershed segmentation (watershed), or the Euclidean distance map (bwdist) to separate blobs.  But it seems like these are often problematic and over segment the object, sending a dividing line across the blob at every little indent in the outline.  He could also try erosion down to "markers" (or even to the "utlimate eroded set") and then use the markers to morphologically "reconstruct" the objects (basically dilating out again but don't let blobs join together).  Or if he has just a few images, there's always the manual way - just use freehanddraw (file exchange) to trace a curve and then blacken the binary image under the curve, then call bwlabel.

Sorry but just to be clear, I'm trying to label people clothes in family album photos, I thought of the following procedure to do this task:
1- crop the clothing box (this box may have backgound and partial occlusion)
2- I want to draw a black thin line between those different color regions in the bounding box.
3. use bwlabel to label the pixels of each color region.
Actually I know that I can use a pain program, but my question was, is there someway in matlab to automate step 2?

Thank you all.