need help on various watershed segmentation algorithms

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

need help on various watershed segmentation algorithms

Chris Clarin
Hello,

I am looking for effective watershed segmentation algorithms that I can use
for my objective which is to segment clustered cells in a microscope image.
As of the moment, I am using these three options:

1) process->binary->watershed
2) process->binary->Distance Map->daniel sage's plugin (Watershed Algorithm)
3) blur->binary->Distance Map->daniel sage's plugin (Watershed Algorithm)

but somehow I think there are still other ways to segment properly. I have
come across this: Watershed Segmentation (
http://bigwww.epfl.ch/sage/soft/watershed/) again by Daniel Sage and I am
getting a little confused on the differences among all of the three
algorithms available: the one built in imagej (process->binary->watershed),
the watershed immersion algorithm created by daniel sage (the translation of
the one by Lee Vincent and Pierre Soille) and the new one I discovered
today, the watershed segmentation algorithm. can anyone explain to me their
differences? and what do you think is the most feasible that I could use for
segmenting badly clustered cells.


Thank you very much. Any help would be greatly appreciated.

Best regards,
Christine

-------------------------------------------------------------------
Christine T. Clarin
UP Department of Computer Science
Work/Fax: (02) 925-2366
Mobile: (+63917) 482-3606
Email: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: need help on various watershed segmentation algorithms

Gabriel Landini
On Friday 28 December 2007, Chris Clarin wrote:
> 1) process->binary->watershed

That is not the traditional "watershed", but perhaps it should be
called "watershed separation". It separates  touching binary blobs. It finds
the watershed of the euclidian distance map of the blobs.

> 2) process->binary->Distance Map->daniel sage's plugin (Watershed
> Algorithm)

> 3) blur->binary->Distance Map->daniel sage's plugin (Watershed
> Algorithm)

In principle same thing as above?

I am not sure what you want to do but Daniel's plugin should work on the
greyscale images or on gradient images rather than first converting to binary
and then doing the EDT. Of course it depends what you want to do.

I found this paper to be very informative:
Watersheds in digital spaces: an efficient algorithm based on immersion
simulations.  Vincent, L.; Soille, P.  Transactions on Pattern Analysis and
Machine Intelligence  Volume 13, Issue 6, Jun 1991 Page(s):583 - 598

The plugin below is an example to call the Daniel's watershed class and
display only the dams.

Cheers,

G.



//-------------------------------------------------
import ij.*;
import imageware.*;
import watershedflooding.*;

/**
* Class MacroWatershed_.
*
* Easy example of calling watershed methods.
*
* @author Daniel Sage
* Biomedical Imaging Group
* Swiss Federal Institute of Technology Lausanne
* EPFL, CH-1015 Lausanne, Switzerland
*/

public class WatershedDams_ {

        public WatershedDams_() {
               
                // Get the input image
                ImagePlus imp = WindowManager.getCurrentImage();
                if (imp == null) {
                        IJ.error("No open image.");
                        return;
                }
               
                if (imp.getType() != ImagePlus.GRAY8 && imp.getType() != ImagePlus.GRAY32) {
                        IJ.error("Require a 8-bit or 32-bit image.");
                        return;
                }
               
                ImageWare image = Builder.wrap(imp);
               
                // Start the watershed segmentation
                boolean displayProgressionMessage = false;
                Watershed watershed = new Watershed(displayProgressionMessage);
               
                boolean connectivity4 = false;//8
                int maxLevel = 255;
                watershed.doWatershed(image, connectivity4, maxLevel);
               
                // Available outputs
                ImagePlus dams = watershed.getDams();
                dams.show();
        }
}


//-------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: need help on various watershed segmentation algorithms

Michael Schmid
In reply to this post by Chris Clarin
Hi Chistine,

to increase your confusion, there is at least one more:
Process>Binary>Find Maxima can do Watershed segmentation based
on *pixel values* (as the watershed command by Daniel Sage,
without preprocessing).
With Process>Binary>Find Maxima one can avoid oversegmentation by
using a proper value of the noise tolerance.

If you want watershed segmentation of the distance map, it is only
the outline of the particles that matters, not the pixel values.
In this case, the built-in Process>Binary>Watershed command has a
slight advantage over other algorithms that do watershed
segmentation of the EDM (Euclidian Distance Map):
The algorithm is aware of the limitations of an EDM caused by
finite resolution (i.e., pixels) and corrects for these (an EDM
with sub-pixel resolution is used internally).
Thus, it will usually perform better with respect to avoiding
false segmentations while on the other hand keeping the maximum
sensitivity towards particles with a waist not much narrower than
the remaining particle.

Anyhow, finding the best algorithm for your problem will probably be
a matter of trial and error.

Michael
____________________________________________________________________

On Fri, 28 Dec 2007 19:08:12 +0800 Chris Clarin
<[hidden email]> wrote:

>Hello,
>
>I am looking for effective watershed segmentation algorithms that I can use
>for my objective which is to segment clustered cells in a microscope image.
>As of the moment, I am using these three options:
>
>1) process->binary->watershed
>2) process->binary->Distance Map->daniel sage's plugin (Watershed Algorithm)
>3) blur->binary->Distance Map->daniel sage's plugin (Watershed Algorithm)
>
>but somehow I think there are still other ways to segment properly. I have
>come across this: Watershed Segmentation (
>http://bigwww.epfl.ch/sage/soft/watershed/) again by Daniel Sage and I am
>getting a little confused on the differences among all of the three
>algorithms available: the one built in imagej (process->binary->watershed),
>the watershed immersion algorithm created by daniel sage (the translation of
>the one by Lee Vincent and Pierre Soille) and the new one I discovered
>today, the watershed segmentation algorithm. can anyone explain to me their
>differences? and what do you think is the most feasible that I could use for
>segmenting badly clustered cells.
>
>Thank you very much. Any help would be greatly appreciated.
>
>Best regards,
>Christine
>
>-------------------------------------------------------------------
>Christine T. Clarin
>UP Department of Computer Science
>Work/Fax: (02) 925-2366
>Mobile: (+63917) 482-3606
>Email: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: need help on various watershed segmentation algorithms

Gabriel Landini
On Friday 28 December 2007, Michael Schmid wrote:
> to increase your confusion, there is at least one more:
> Process>Binary>Find Maxima can do Watershed segmentation based
> on *pixel values* (as the watershed command by Daniel Sage,
> without preprocessing).

Ah, yes, sorry I forgot that one, thanks.

Is that the same as the skiz? (skeleton of the [binary] background)?

I guess (but could be very wrong) that the Process>Binary>Watershed has a
limitation of the maximum 255 computable distances same as the EDM command?

Some time ago I wrote a macro to do EDMs beyond the 255 limit of built in EDM
function (in the Morphology collection). That may come in handy if the
particles are larger than 255 in diameter, but it will not do the subpixel
correction that Michael mentioned.

Regards,

G.
Reply | Threaded
Open this post in threaded view
|

Re: need help on various watershed segmentation algorithms

Michael Schmid
In reply to this post by Chris Clarin
Hi Gabriel,

for Process>Binary>Watershed the minimum waist size (diameter where
the particle can be cut by segmentation) is 1595 pixels.
Wider particles are not segmented. The length of the particle does
not matter.
This restriction comes from using the internal 16-bit EDM
(Euclidian Distance Map), which has has a scale factor of 41 for
a single pixel distance:

41*1596/2 = 32718 (the distance to one border is half the diameter)
This is almost 2^15 = 32767, the limit of (signed) 16-bit numbers.

---

Process>Binary>Find Maxima/Segmented Particles:
This is very different from skiz (skeleton of the [binary] background).

For segmentation, Find Maxima applies the watershed algorithm to
the *pixel values*, thus it needs a grayscale image as an input,
not a binary one. This algorithm works best if the particles become
denser towards the center; see the sample image for Segmented Particles
at
http://rsb.info.nih.gov/ij/docs/menus/process.html#binary

Best wishes,

Michael

_____________________________________________________________________
On Fri, 28 Dec 2007 22:08:20 +0000 Gabriel Landini
<[hidden email]> wrote:

>On Friday 28 December 2007, Michael Schmid wrote:
>> to increase your confusion, there is at least one more:
>> Process>Binary>Find Maxima can do Watershed segmentation based
>> on *pixel values* (as the watershed command by Daniel Sage,
>> without preprocessing).
>
>Ah, yes, sorry I forgot that one, thanks.
>
>Is that the same as the skiz? (skeleton of the [binary] background)?
>
>I guess (but could be very wrong) that the Process>Binary>Watershed has a
>limitation of the maximum 255 computable distances same as the EDM command?
>
>Some time ago I wrote a macro to do EDMs beyond the 255 limit of built in EDM
>function (in the Morphology collection). That may come in handy if the
>particles are larger than 255 in diameter, but it will not do the subpixel
>correction that Michael mentioned.
>
>Regards,
>
>G.
>