The watershed transform, from mathematical morphology, is a powerful and flexible tool for segmentation. However, it does not allow a priori knowledge relating to characteristics of region boundaries to be included in the way that other approaches do. This paper introduces the locally constrained watershed transform, which includes border constraints by modifying the underlying path definition upon which the watershed transform depends. This approach maintains many of the desirable properties of the watershed transform, such as well-defined stopping conditions and efficient implementation, while offering more stable segmentation in the presence of noisy or incomplete boundaries