[SciPy-User] watershed question

Stéfan van der Walt stefan@sun.ac...
Wed Apr 28 10:36:09 CDT 2010

Hi Emmanuelle

On 25 April 2010 14:34, Emmanuelle Gouillart
<emmanuelle.gouillart@normalesup.org> wrote:
>        I would expect the watershed transform to separate the connected
> circles along the constriction, as Matlab does (see
> http://sd-2116.dedibox.fr/scipy_examples/watershed_matlab.png), but
> instead, it seems that the marker with the smallest (positive) distance
> completely "invades" the basin of the marker with the greatest distance
> to the background. A picture of what I obtain can be found on
> http://sd-2116.dedibox.fr/scipy_examples/watershed_example.png,
> and below is the code that computes the watershed
> **********
> ***********
> Is it a bug that the watershed transform doesn't separate regions along
> the ridges of the array 'distance'? Am I doing something wrong?

Unless I'm also missing something obvious, the code returns an invalid
result.  I even adjusted the depths of the two "pits", but always one
region overruns the other---not what I would expect to happen.  I
haven't delved into the ndimage code at all, but I wonder weather we
shouldn't implement one of the simpler algorithms as part of
scikits.image.segment for comparison?


More information about the SciPy-User mailing list