[Insight-users] Separation of objects using watersheds

Joshua Cates cates at sci.utah.edu
Tue Jun 15 12:51:45 EDT 2004


Hello Max,

The watershed algorithm is identifying only two regions because 
there is no ridge line between what you consider to be the background and 
the two circles you are trying to segment.   A distance transform from two 
points produces a gradient that continues all the way to the edge of the 
image.  The "background" has therefore been associated with the first of 
the two basins that it spills into.

Note that there are popular variations on the watershed transform idea
that would produce different results for this image.  The ITK ws transform 
performs a global gradient descent TO local minima.  Many implementations 
perform region growing FROM local minima, which could produce the results 
you are after.


Hope this helps,

Josh.

______________________________
 Josh Cates			
 Scientific Computing and Imaging Institute
 University of Utah
 (801) 587-7697
 http://www.sci.utah.edu/~cates


On Tue, 15 Jun 2004, Max Schoebinger wrote:

> Hello everyone,
> 
> i would like to use the itk::WatershedImageFilter for separating 
> connected objects by running the watershed transform on an inverted 
> distance tranform of the segmentation. Therefore, i am trying to 
> reproduce the results of a simple example given in section "Example 1" 
> of the following page:
> 
> http://www.mathworks.nl/company/newsletters/news_notes/win02/watershed.html
> 
> Unfortunately, the results of the implementation in itk do not seem to 
> be correct (at least to me). Please find attached the file input.png and 
> result.png, which have been calculated using 0.0 for the flood level and 
> threshold parameters. As you can see, the left circle isn't even 
> included in the basic segmentation, which is obviously an error assuming 
> a flood level of 0.
> 
> I have attached the sourcecode, but its just a straightforward 
> implementation of calling the itk::WatershedImageFilter.
> 
> Any help is appreciated!
> 
> Thanks in advance,
> 
> Max
> 
> -- 
> Dipl.-Inform. Med. Max Schöbinger
> Deutsches Krebsforschungszentrum       (German Cancer Research Center)
> Div. Medical & Biological Informatics          Tel: (+49) 6221-42 2370
> Im Neuenheimer Feld 280                        Fax: (+49) 6221-42 2345
> D-69120 Heidelberg                       E-Mail: M.Schoebinger at dkfz.de
> 



More information about the Insight-users mailing list