Watershed Segmentation
Watershed Algorithm for Image Segmentation · Also known as: Watershed transform, Water shedding segmentation
Watershed segmentation is a morphological image processing technique that automatically segments an image into distinct regions by treating image intensity as a topographic landscape where each object corresponds to a valley. Introduced by Beucher and Lantuéjoul in 1979 and refined by Meyer, the watershed algorithm is particularly effective for separating touching or overlapping objects.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use watershed segmentation when images contain touching or overlapping objects that need to be separated, such as cell nuclei in microscopy, overlapping coins or pills, or clustered particles. Watershed is especially useful after computing a distance transform or gradient, as it naturally delineates regions. Avoid watershed when dealing with noisy, low-contrast images without clear structure, or when oversegmentation (too many small regions) is a significant problem; post-processing (morphological operations or region merging) is often necessary.
Strengths & limitations
- Excellent at separating touching or overlapping objects without assuming object shape
- Produces connected, closed region boundaries (complete segmentation)
- Scalable to large images; can be computed efficiently using immersion simulation
- Naturally incorporates prior knowledge through marker placement
- Works well on gradient or distance transform images where regions have clear structure
- Sensitive to noise; small intensity fluctuations can create spurious regions, causing oversegmentation
- Requires preprocessing to define meaningful regions; poor gradient computation leads to poor segmentation
- Marker selection is critical but often manual; automatic marker detection is non-trivial
- Produces many small, fragmented regions; post-processing (region merging) is usually required
Frequently asked
What is the difference between using watershed on gradient images versus distance transforms?
Watershed on gradients (edge magnitude) produces boundaries at high-intensity edges, useful when object boundaries are clear. Watershed on distance transforms (where intensity represents distance from boundary) produces regions based on object centrality; each region is assigned to its nearest center or marker. The choice depends on the image type and what region properties are important.
Why does watershed often produce oversegmentation?
Oversegmentation occurs when many local minima exist in the gradient or distance transform, each producing a separate watershed region. Noise amplifies this problem. To reduce oversegmentation, preprocess the image using morphological operations (opening, closing) to merge nearby minima, or use marker-based watershed with carefully selected seed points instead of automatic minima detection.
How do markers control the watershed algorithm?
Markers are predefined seed points (pixels or regions) that represent objects or background. Marker-controlled watershed assigns each pixel to the nearest marker by simulating water flow. This approach avoids automatic minima detection and its associated oversegmentation. Markers can be placed manually or detected automatically using morphological operations (e.g., eroded objects as markers).
What post-processing is typically needed after watershed segmentation?
Watershed typically produces many small regions and needs post-processing to merge semantically similar regions or remove noise. Common post-processing steps include morphological closing (dilation followed by erosion) to merge nearby regions, region merging based on similarity, or filtering regions by size or shape. The specific post-processing depends on the application.
Sources
- Meyer, F. (1994). Topographic distance and watershed lines. Signal Processing, 38(1), 113–125. DOI: 10.1016/0165-1684(94)90060-4 ↗
- Beucher, S., & Lantuéjoul, C. (1979). Use of watersheds in contour detection. International Workshop on Image Processing, Real-Time Edge and Motion Detection/Estimation, 2.1–2.12. link ↗
How to cite this page
ScholarGate. (2026, June 3). Watershed Algorithm for Image Segmentation. ScholarGate. https://scholargate.app/en/computer-vision/watershed-segmentation
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Blob DetectionComputer Vision↔ compare
- Canny Edge DetectionComputer Vision↔ compare
- Contour AnalysisComputer Vision↔ compare
- Histogram EqualizationComputer Vision↔ compare
- Image Morphology OperationsComputer Vision↔ compare