watershed
Watershed transform
Description
The watershed transform finds "catchment basins" or "watershed ridge lines" in an image by treating it as a surface where light pixels represent high elevations and dark pixels represent low elevations. The watershed transform can be used to segment contiguous regions of interest into distinct objects.
Examples
Input Arguments
Output Arguments
Tips
The watershed transform algorithm used by this function changed in version 5.4 (R2007a) of the Image Processing Toolbox™ software. The previous algorithm occasionally produced labeled watershed basins that were not contiguous. If you need to obtain the same results as the previous algorithm, use the function
watershed_old
.To prevent oversegmentation, remove shallow minima from the image by using the
imhmin
function before you use thewatershed
function.
Algorithms
watershed
uses the Fernand Meyer algorithm [1].
References
[1] Meyer, Fernand, "Topographic distance and watershed lines,” Signal Processing , Vol. 38, July 1994, pp. 113-125.
Extended Capabilities
Version History
Introduced before R2006aSee Also
bwlabel
| bwlabeln
| bwdist
| regionprops
| imhmin