Watershed algorithms. The watershed algorithm segments and labels an image using an analogy to a landscape. The image intensities are turned into the z-height of the landscape and the landscape is "filled with water" and the bodies of water label the landscape's pixels. Here is the reference for the original paper:
Lee Vincent, Pierre Soille, Watersheds in digital spaces: An efficient algorithm based on immersion simulations, IEEE Trans. Pattern Anal. Machine Intell., 13(6) 583-598 (1991)
Watersheds are often performed on the gradient of an intensity image or one where the edges of the object boundaries have been enhanced. The resulting image has a depressed object interior and a ridge which constrains the watershed boundary.