Watershed segmentation [7] finds pixels at the midpoints between features by treating the pixel values as topographic elevations. The areas between features become catchment basins which depict the influence zones in the image (see figure below). Images should be low-pass filtered first to avoid over-segmentation.
The output is a new image in which each catchment basin is given a different gray scale value. The actual watershed points are those points on the new image with a value of 0. These points can be selected by inverting and increasing the contrast, or by applying the formula
Watershed segmentation of an emulsion autoradiogram.
A Original image
B Watershed segmentation superimposed on the image. The image
was low-pass filtered twice using a 5
5 kernel before segmentation.
The segmentation edges (i=0 points) were pasted over the original using
the ``Mask..Add'' function.
C Watershed segmentation of grayscale-inverted image, created
as in A except the image colors were inverted before segmentation.
The watersheds now track the closest distance between the grains instead
of the greatest distance between them.
D Actual watershed segmentation obtained in B, with a
spectrum colormap added.
E Quick segmentation result superimposed on the same image
in A for comparison. Image was filtered once with a 15
15
low frequency removal filter, using a kernel multiplier of 2 before
quick segmentation. Line around outside is an edge artifact
caused by the filtering.
If the gray scale of the image is inverted first, the result is that lines are drawn connecting the highest elevation routes through the features instead of around them (see figure).
The segmentation pattern can be superimposed on the original image by the following procedure: