ImageMorphology Watershed

Is there any documentation or reference what the "watershed" method of ImageMorphology does?
When applying ImageMorphology Watershed, M_Binary to the attached 2D wave, I naively thought I would separate any overlapping blobs (as e.g. the watershed filter in Fiji/ImageJ does), but the outcome is something entirely different.
M_Binary.ibw
It seems that you are trying to apply the watershed operation to a binary image. Instead the operation expects a grayscale image. See the Image Processing Tutorial (File Menu->Example Experiments->Tutorials) for an example

A.G.
WaveMetrics, Inc.
A.G.,

Igor wrote:
It seems that you are trying to apply the watershed operation to a binary image. Instead the operation expects a grayscale image.


I quote from DisplayHelpTopic "ImageMorphology" (IGOR 6.34A): "Watershed: Calculates the watershed regions for grayscale or binary image."

Running the following on the attached wave M_Binary:
NewImage M_Binary
ImageMorphology/N Watershed, M_Binary
AppendImage M_ImageMorph
ModifyImage M_ImageMorph explicit=1, eval={0,65000,0,0}


gives Figure 1.

Assuming that I can represent the input image as greyscale as distance transform (http://www.igorexchange.com/node/4590), I execute:

make_fastEDT(M_Binary)  // from igorexchange.com/node/4590
NewImage M_DistanceTransform  
ImageTransform/O convert2gray M_DistanceTransform
ImageMorphology/N Watershed, M_DistanceTransform
AppendImage M_ImageMorph
ModifyImage M_ImageMorph explicit=1, eval={0,65000,0,0}


which gives Figure 2. The outcome seems identical. What I would like to get out is Figure 3, which was created using FIJI and the "Binary Watershed" process. Obviously these are different implementations but I do not understand the significance of the outlined regions from ImageMorphology.

Cheers
Christian










When I initially saw your question I also ran the distance transform (built-in IP7). Then I stopped and thought about this and realized that it does not make sense. If you don't immediately see why, display the distance transform as a surface in Gizmo and try to imagine that you are filling this surface with water...

The simple watershed operation is not of much use when your input is a binary image. If you have a grayscale image you can use ImageMorphology as in the Tutorial example. It is actually useful to run that simple example and put a cursor on the image to examine the values of the image where the red lines are drawn. These are the local "peaks" -- clearly not something that would help you separate the blobs as your peaks will be lines joining the centers of the connected blobs.

Your OP did not mention the ultimate goal of this task. I am not aware of an ideal way to account for exact areas of the blobs unless you make some assumptions about circularity etc. However, it is fairly straightforward to run a few iterations of binary erosion to separate them, e.g.,
  ImageMorphology/O/E=(5)/I=(3) BinaryErosion, M_Binary

Once you complete the separation you should be in a better position to analyze the original binary image.

A.G.
Igor wrote:
When I initially saw your question I also ran the distance transform (built-in IP7). Then I stopped and thought about this and realized that it does not make sense. If you don't immediately see why, display the distance transform as a surface in Gizmo and try to imagine that you are filling this surface with water...


If you are interested in "blobs", of which you are sure that the shape is such that they have only one local maximum in the distance transform, then running the watershed operation on a distance transform lets you separate touching or slightly overlapping blobs.