ImageMorphology Watershed
ChrLie
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.
A.G.
WaveMetrics, Inc.
August 15, 2014 at 12:19 pm - Permalink
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:
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:
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
August 17, 2014 at 04:09 am - Permalink
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.,
Once you complete the separation you should be in a better position to analyze the original binary image.
A.G.
August 17, 2014 at 09:40 am - Permalink
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.
August 29, 2014 at 03:03 am - Permalink