Adjustable Watershed


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,

Well, we finally got the answer. It seems that the plugin Adjustable Watershed calculates the EDM matrix and after that it searches for maxima following this criteria: EDM value of the Maxima-Tolerance= Treshold limit.
So, for a possible maxima to be considered as a starting point for the “filling”, it has to be surrounded by pixels with EDM values smaller than this treshold. For example: if you have a pixel value of 100 and your tolerance is 10, 100-10= 90. To this pixel to be considered as a starting point for the filling, it has to be surrounded by pixels with values smaller than 90, so having only one surrounding pixel with a value of 91 is enough to discard the maxima.

Nevertheless, it isn’t clear yet how we can use this information to segmentate irregular particles.

I like to experiment with this plugin but could only download the java file and was unsuccessful in compile/run (generates errors and warnings). Anyone happens to have the jar file?