Page history Edit this page How do I edit this website?
This page describes content relating to the original version of ImageJ. Click the logo for details.

Adjustable Watershed

Adjustable Watershed

Watershed segmentation of binary images based on the Euclidian Distance Map, similar to Process>Binary>Watershed but with adjustable sensitivity and preview


Watershed segmentation based on the EDM splits a particle if the EDM has more than one maximum, i.e., if there are several largest inscribed circles at different positions. Thus, it is best for segmenting particles that roughly circular.

Adjustable Watershed screeshot

Dialog Options (Parameters)

Tolerance: 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.


  • The plugin should not be used if particles can have inner holes. For such particles, unpredictable segmentation lines can occur or the particle may remain unsplit. To make sure you have no such particles, you may run ‘fill holes’ before use and see whether anything changes.


  • Source code on GitHub (make sure you download the raw file, use the button near the top right)
  • Class file Adjustable_Watershed.class on GitHub


  • Copy the raw file into the ImageJ plugins folder or a subfolder thereof. Make sure that you name the downloaded file ””; uppercase/lowercase matters.
  • Compile with “Compile and Run” and press “OK”. Note that “Compile and Run” is currently broken on Fiji; as a workaround use File>New>Script, open the file and press “Run“.
  • Alternatively, directly save the .class file Adjustable_Watershed.class into the ImageJ/plugins directory or an immediate subdirectory thereof. Again, make sure that you name the file correctly, uppercase/lowercase matters.
  • Use Help>Update Menus or restart ImageJ to make it appear in the Plugins menu (not necessary if you have used the Fiji Script Editor).


2022-12-15, by Michael Schmid: Uses nonblocking dialog