Discuss a modified watershed approach


I think about a advanced version of the Process -> Binary -> Watershed method. As far as I understand the method work as follows:
0. Input binary image

  1. Calculate the EDM
  2. Find maxima on the EDM
  3. Outgoing from each maxima, make dilation** : “It then dilates each of the UEPs (the peaks or local maxima of the EDM) as far as possible — either until the edge of the particle is reached, or the edge touches a region of another (growing) UEP”
  4. Add split point where two regions are touching.

**As for the dilation: I guess the dilation is done on the EDM map? Outing from a maxima, a region growing algorithm is applied with a tolerance of 1. For next dilatation the tolerance is increased by 1. Right?

If my assumptions are correct, then I would like to propose the following change:

Instead of using the maximas on the EDM as seed points for the region growing (or dilation), we could use the maximas on the symmetry map calculated by the fast radial symmetry technique (FRS). It seems for me, that the splitting capability could be improved by that way. However, it needs many more parameters so it is not meant to be a replacement for the current watershed command.

The FRS technique is descriped here:

The FRS technique is already implemented for imagej by @ThomasBoudier .

We could copy and adapt the code easily.
Who did implement the Process->Binary->Watershed command and can comment on this? Maybe @Wayne ?

I would be happy to hear your opinion.


Hello Thorsten,

I’m about to release a Distance Transform Watershed plugin in MorphoLIbJ that allows using different distance transforms and has a few other options to produce different partitions. It is already in the master branch of the project if you are interested on trying it out. There is also a 3D version of it.


I’ve downloaded the master branch and applied mvn clean package. However, I only get jar file with the sources but not with the binaries. What am I doing wrong?

Forget it :slight_smile: It was copied to the plugins directory…

I tried it out and it works nicely. Could you give advices how to choose the appropriate distance transforms?

However, it seems not to be a solution for the problem I’m facing. It’s about particles which are overlapping that much, that the could not splitted by the standard watershed anymore.

This is synthetic example:

None of your the distance transforms are able to split these particles. However, using the FRS they are identifiable:

run("Distance Map");
run("3D Edge and Symmetry Filter", "alpha=0.500 radius=80 normalization=10 scaling=2 improved");
run("Enhance Contrast...", "saturated=0 normalize");
run("Find Maxima...", "noise=0.05 output=[Point Selection]");

I see. I made a short experiment to test your approach with the current tools in MorphoLibJ:

  1. I took your distance image and inverted it
  2. Then found its extended minima (dynamic = 13)
  3. Imposed the minima on the inverted distance image
  4. Applied watershed on the result of 3) using the original binary image as mask.

This is the result I got:

Is this what you expected?

1 Like

Hi @twagner and @iarganda,

My 3D watershed implementation is illustrated here :


Your image is quite challenging since we cannot see cleat separation from the two spheres. Hence the idea of first finding the two centres is the correct one I think.

Will be happy to follow on discussions on the topic.



1 Like

Hi Thomas,

Is there any docs available which explains the 3D edge and symmetry filter parameters very well.


Hi twagner,

Looks like Morphological segmentation in Morpholibj library is good in solving your problem.

Best Regards

Sorry for my late answer. Too many things done parallel…

Your result looks interesting. However, I was looking for a result like this:

Hi suvgit,

You can find the documentation of the “3D Suite” here : http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_ij_suite:start

The details for the symmetry filter can be found here : http://imagejdocu.tudor.lu/doku.php?id=plugin:filter:3d_edge_and_symmetry_filter:start

Hope this helps


1 Like

Hi Thomas,

Thanks a million. Much appreciated!!

Hi @twagner,
I am not sure to get fully the proble you are facing.
But I implementend some years ago an algorithm that finds the “2 bottleneck points” and then draw a lines between them splitting your object in two objects. It doesn’t pass by watershed, it is a simply geometrical solution.
This pass by geometrical consideration about where are the botttleneck points of a “figure eight” shape as the maximum of ratio between the distance two points along the boundaries and euclidean distance between them, for every couple of points in the boundaries.
As better explained in this paper: http://www.nature.com/nmeth/journal/v4/n2/extref/nmeth1008-S1.pdf
“Single-cell quantification of molecules and rates using open-source microscope-based cytometry”

I don’t know if it could be useful for you, and ok it is a completely different approach but ok for me that worked pretty good.
Unfortunately, I’ve implemented it in a matlab code that I don’t find at the moment…
Have a nice day,

Hi Thomas,

I am using 3D Edge and Symmetry filter to analyse 2D micrographs. As the plugin is using Canny edge detection algorithm, it is doing a great job in finding the edges and symmetry. But, I have a question like, after applying the filter, when I analyze the particles, is the area of the particles appearing in the results window, a spherical area (4πr^2) or circular area (πr^2)? Looking forward to hear from you.


Hi suvgit,

I am glad that the plugin is working well in 2D also :slight_smile: . About the analysis, usually the area are displayed in nm^2 (or whatever unit), as the number of pixels (or voxels in 3D) comprising the object, multiplied by the area of one pixel givem by the calibration. Maybe by the spherical or circular area you are referring to circularity ?



I confirm the results of @iarganda, taking the two seeds as the two strongest local maxima from the symmetry filter gives something like this :



Hi Thomas,
Thank you for your reply. The area I was referring to was the "Area’’ I am getting in the results window of Analyzed particles which I am filtering with circularity of 1.00. My question was, should I consider that Area as a circular area, as I am using a 2D image and as a spherical area if I was using a 3D image. Anyways, right now I am considering it as a circular area ((πr^2)), bcoz i need to calculate the radius of the identified particles from the area.

I have 3 more questions

  • For the same parameter values (alpha, radius, normalization, scaling) given for the 3D Edge and Symmetry filter, i am getting different count and mean area for the analyzed particles with the showEdges checkbox ticked and not. Do you have any idea on that?

  • From the imagej docs of 3D Edge and Symmetry filter, I found that the radius parameter refers to the radius of the object whose symmetry is to be detected. I am giving it as 3 pixels. Does that mean that the plugin will only consider objects with that radius or is that the minimum object radius?

  • I would like to get more info on the scaling and normalization parameters as well

Dear Emanuele,

thank your four suggestion. I’m aware of approaches like these. My experience with the bottleneck detection (or concave points detection) is that it is not very robust and if the objects show some heterogeneity in size/shape it often impossible to find good parameters.

However, I will take a look into your suggested method.


1 Like

Hi suvgit,

Looks like two threads interlace in this discussion :wink: . To get a fitting circle there are many ways, finding the one with same surface is one possibility, you can also use Feret, ellipsoid fitting, average distance from center to contours, …

For the symettryfilter there shoudl be no difference if you select showEdges or not, however note that there is an option to display the normal version or the smoothed version of the symmetry. Yes the value for the radius parameter shoud be a bit bigger than the radius of the object you want to detect. For the scaling and normalization parameters, please refer to the publication.

Hope this helps


Thank you Thomas for your valuable reply. Apologies for mixing two different discussion threads.
Best Regards,