The watershed algorithm is a technique used for image segmentation. The segmentation here signifies that the image is partitioned into connected regions. Each region contains pixels having more or less the same characteristics. A region may be characterized by a mean value of gray levels, variances of gray levels, etc. The standard watershed algorithm, based on the use of mathematical morphology was proposed in (1). The current paper describes a modification of this algorithm, which is easier to explain and implement, and gives satisfactory results in a typical case. The paper presents two applications of the watershed algorithm. One of them is related to the quality control, and in particular to the detection of defects of the manufactured...