Adjustable Watershed

Tags: #<Tag:0x00007fd542eab2e8> #<Tag:0x00007fd542eab1a8> #<Tag:0x00007fd542eab068>



Does anyone know how the Adjustable Watershed plugin works? I mean, in the Dialog Options (Parameters), what does the “Tolerance” really mean?

I would appreciate any help.


Hi @Alfonso,

I hope this is the plugin you’re using, but from here:


  • This value determines the difference of radius between the smaller of the largest inscribed circles and a circle inscribed at the neck between the particles. The higher this value, the fewer segmentation lines. The standard ImageJ Process>Binary>Watershed algorithm uses a tolerance of 0.5. The value should not be much lower than this because low values tend to produce false segmentations, caused by the pixel quantization.

That’s pretty jargon-y. A summary in my own words - bigger values of the tolerance mean the result will yield fewer distinct particles. Smaller values yield more particles. This agrees with observation:

With tolerance=0.2

With tolerance=2.0

Is that helpful? Do you want to know what it’s doing under the hood to make this happen?



Thank you very much for your reply @bogovicj. I’ve found experimentally the same thing that you showed me, and you’re right I want to know what this plugin is doing under the hood to make those different separations.
I’m currently working in one particular case which is quite complicated because it’s an irregular particle (or more than one ) and this plugin works well with roughly circular ones.

The particle is this:

With tolerance=1.0:

The pre-watershed EDM with tolerance=1.0:

With tolerance=2.0

The pre-watershed EDM with tolerance=2.0:

So focusing in the segmentation occuring in the down left region of the particle, and plotting the EDM trying to figure out why with tolerance=1.0 the “filling” starts from two minimums and with tolerance=2.0 it starts with only one, I ended up in a bottleneck.

This is what I got at the moment. I will continue researching beacuse I think this plugin could work well not only for roughly circular particles but for irregular ones as well.
Of course any kind of contribution is welcome.



Cool, that’s a nice example.

If you’re willing to look at code, the tolerance is passed as a parameter to MaximumFinder

The interesting part:

@param tolerance Height tolerance: maxima are accepted only if protruding more than this value from the ridge to a higher maximum

Not sure if “ridge” means what I intuitively think, but either way, hope this helps.

Actually the “meat” may be in this method:

At first glance, it looks like it finds a set of possible (local?) maxima, then excludes those that are close to (in space) another maximum that is almost (within tolerance) the same “height” (intensity).

Anyway, please keep us posted if you dig into this further,