分水岭算法

The Watershed Transformation

Principle

Any greytone image can be considered as a topographic surface



If we flood this surface from its minima and, if we prevent the merging of the waters coming from different sources, we partition the image into two different sets: the catchment basins and the watershed lines




If we apply this transformation to the image gradient, the catchment basins should theoretically correspond to the homogeneous grey level regions of this image. 
From top to bottom and from right to left:
  • Original image.
  • Gradient image.
  • Watershed of the gradient image.
  • Final contours.


However, in practice, this transform produces an important over-segmentation due to noise or local irregularities in the gradient image. 
Electrophoresis gel image and watershed transformation of the gradient image.



Marker-controlled watershed

A major enhancement of the watershed transformation consists in flooding the topographic surface from a previously defined set of markers



Doing so, we prevent any over-segmentation. 
Markers of the blobs and of the background and marker-controlled watershed of the gradient image.



The segmentation paradigm

Segmenting an image by the watershed transformation is therefore a two-step process: 
  • Finding the markers and the segmentation criterion (the criterion or function which will be used to split the regions - it is most often the contrast or gradient, but not necessarily). 

  • Performing a marker-controlled watershed with these two elements. 



Examples

In the following examples, we present the initial image, the marker set, the image used for the watershed transformation (criterion) and the final result.

Road segmentation

In this example, the markers have been introduced by hand. A similar technique, but with an automatic detection of the markers, is used in the PROMETHEUSproject. 

Coffee beans separation

In this case, the criterion used is not the contrast (which is irrelevant) but the distance function of the initial image.

Traffic monitoring

In order to count the vehicles in the different lanes of the road, even if the video camera is remotely controlled, an automatic segmentation of the lanes must be performed.
Two images are generated from the scene: an average image (emphasizing the still regions of the scene) and a differential image (enhancing the moving parts of the scene).



The lane markers and the criterion function (made of a combination of a distance function and of a ground marking extraction) are processed by watershed.

Cleavage fracture in steel

The problem here consists in extracting the cleavage facets from a fractured surface in steel (MEB image). A rather complex combination of contrast and distance functions is used in this example.

Silver grains on a photographic plate

This example is more difficult than the coffee beans application because the overlapping regions must be segmented too.





Hierarchical segmentation

The watershed transformation can also be used to define a hierarchy among the catchment basins. Starting from the initial watershed transformation of the gradient image, a mosaic image can be defined, and then its associated gradient. 


Initial image (left) and initial watershed of the gradient (right).

From this image, a new criterion function is built (based on the relative heights of the walls separating the initial catchment basins). The watershed transformation applied to this image provides a higher level of hierarchy in the segmented image (thus suppressing much of the over-segmentation).
This transformation is named Waterfalls Transformation.


Mosaic image (left) and first level of hierarchy (right).
 

Many other techniques and tools can be used to define a hierarchy on an image. Most of them are based on a flooding process. 


P algorithm

The Waterfalls Transformation has two major drawbacks.
The first one comes from the fact that it is difficult to find a "good" level  of hierarchy. Very often, the first level of hierarchy dramatically enhances the segmentation by removing lots of non significant contours, but it is not always sufficient. If the Waterfalls transform is applied again, the new segmentation may seem better...
 or worse...


Successive levels of hierarchy of the gradient watershed of the left image. Does level 2 (third image) seem better?

The second drawback is even more serious. When applying successive Waterfalls transforms, the intermediary levels of hierarchy obtained before the process ends with the empty set are often strange with, indeed, non significant contours which are removed but also, and it is really annoying, significant ones!



Successive levels of hierarchy produced by successive Waterfalls transformations

This defect is sometimes called the Waterfalls Transformation Short-sightedness.

This two major problems can be solved by applying P algorithm. This algorithm consists in re-introducing, at each hierarchical step, contours which have been suppressed according to similarity of contrast and topological criteria. This algorithm is non parametric and always ends with a pretty good segmentation of the image as illustrated in the following examples.







  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值