A grayscale image can be thought as a model for a real surface, this you see in the pictures bellow. Simulating a flood in it, the operator can find the dividing lines or watersheds. Figure one is a image of a large square hole with four smaller ones touching it. Figure two is the same image but random colored to better show the depth of each hole. Figure three is the image seen as a surface. Figure four is the result of the operator on the first image. There you see the operator extracted all points where the small squares touch the large one. This is because their borders where at the same level.
fig. 1 - a grayscale image
fig. 2 - The last image with a random color map
fig. 3 - Viewing as a surface
fig. 4 - The watershed
However the operator is not used without some image filtering or preparation because it is very sensitive to noise. If you want to know more about this look in applications.
Executing the cantata workspace water.wk