Path: news.mathworks.com!not-for-mail
From: "Sven " <sven.holcombe@gmail.deleteme.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Separating connected image regions?
Date: Fri, 15 Aug 2008 19:02:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 48
Message-ID: <g84jra$dlv$1@fred.mathworks.com>
References: <g828t6$5fg$1@fred.mathworks.com> <b902fd14-8fdc-4d2d-b603-c95b4b140531@k30g2000hse.googlegroups.com>
Reply-To: "Sven " <sven.holcombe@gmail.deleteme.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1218826922 14015 172.30.248.35 (15 Aug 2008 19:02:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 15 Aug 2008 19:02:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326470
Xref: news.mathworks.com comp.soft-sys.matlab:485734



Steve Carano <scarano1@earthlink.net> wrote in message
<b902fd14-8fdc-4d2d-b603-c95b4b140531@k30g2000hse.googlegroups.com>...
> There are some excellent examples in the image processing
toolbox that
> demonstrate the distance function as well as watershed
(probably more
> appropriate for your application) segmentation.
> 
> Steve.

Hi Steve, thanks for the pointer.  I have had a look at
watershed, but my results always seemed to be over-split
(ie, I found too many pools of water).

I thought I should just upload a sample image for clarity.
You can find it here:
http://tinypic.com/view.php?pic=292y49t&s=4
(It has been blurred very slightly in this view, but you can
easily see the two red blobs and where I would like to
separate them).

I am thinking of doing the following:

1: Threshold and get a binary of the two blobs combined into
one blob.
2: Caculate the distance function for that blob.
3: Select two points, one near the centroid of each of the
two blobs (as I wrote in my previous post, I think I can
obtain these)
4: Try to watershed the distance function using these two
points as sources.

I was hoping that this would result in two regions that
match (reasonably well) the two blobs that I'm looking for.
I am having trouble though, forcing the watershed function
to return just two regions. It instead seems to be quite
arbitrary, splitting each blob into a few small regions on
some images, and sometimes returning only one of the blobs
on other images.

I am quite sure that I'm not preparing my image well enough
to force the watershed algorithm to work how I want it (ie,
return two regions).

Can anyone help me out with this?

Cheers,
Sven.