What is watershed?

Everyday meanings of “watershed” include “an area or ridge of land that separates waters flowing to different rivers, basins, or seas” and “a (river) basin, a turning point, a junction”.
Watershed processing is a method of region segmentation in which the brightness gradient of an image is likened to mountains and valleys, and segmentation into regions in which a river that flows into a valley is surrounded by mountains is conducted.

Example of 1D watershed

Example of 1D watershed

When counting items next to each other that are completely connected, in the case where blob analysis or the like is used, the items are regarded as the same thing, so separation cannot be performed well, but when watershed processing is used, separation can be performed.

Watershed (Region segmentation)