Assignment help




解决标签临时标签之间的相等关系,本算法采用一组等价的标签来保存所有临时标签分配给一个连接组件和最小的标签是标签作为代表。当一个新的临时labelis生成,建立了相应的标签设置,和代表标签设置为本身,也就是说. .每当发生标签等价,或面具分别属于不同的setsand,这两组都合并在一起,他们最小的标签被认为是他们的代表标签。他们把三个简单的一维数组来实现这个过程不使用指针,但缺点是,当与更多的元素合并成一组一组用更少的元素,解决过程将花费太多的时间。总之,EFS是迄今为止最有效的基于像素扫描策略。


In this section, we introduce three most efficient labeling algorithms: EFS, SAUF and BBDT. For convenience, we assume that the input images are binary images (foreground pixels and background pixels are represented by 1 and 0, respectively) with zero borders and consider only the eight-connectivity. We useto denote the input image andfor the symbolic image. For the general label-equivalence-based algorithms, the mask used in the first scan is shown in Fig. 1. To speedup the labeling procedure, there are two common strategies. One is to reduce the average number of times for checking the processed neighbor pixels in the first scan, and the other is to resolve the label equivalences quickly by an efficient data structure.

He’s EFS method process the foreground pixels following a background pixel and those following foreground pixels in a different way, which can reduce the average number of neighbors accessed from 2.25 to 1.75. During the first scan, for each current foreground pixel, we have already known whether the previous pixel is a foreground pixel or not, thus, it can be removed from the mask. Therefore, the mask used here consists of only the three processed neighbor pixels of the current foreground pixel in the row above,, and (that is, , and), as shown in Fig. 2. For processing a current foreground pixel following a background pixel, the same method as proposed in FCL [15] is used. While, for the current foreground pixel following another foreground pixel, the label of its previous foreground pixel is assigned to it, and the left thing needed to do is only to check whether this label is equivalent to the label assigned to pixel .

To resolve label equivalences between provisional labels, this algorithm adopts an equivalent label set to hold all the provisional labels assigned to a connected component and the smallest label is taken as the representative label. When a new provisional labelis generated, the corresponding equivalent label set is established as, and the representative label is set to itself, i.e.. Whenever label equivalence occurs, say, andin the mask belong to different setsand separately, these two sets are merged together, and their smallest label is regarded as their representative label. They took three simple one-dimensional arrays to implement this process without using pointers, but the drawback is that when a set with more elements is merged into a set with fewer elements, the resolve procedure will cost much time. Anyway, EFS is a most efficient pixel-based scan strategy so far.