Efficient 2×2 block-based connected components labeling algorithms - Santiago, Diego J.C.; Ren, Tsang Ing; Cavalcanti, George D.C.; Jyh, Tsang Ing (2015 IEEE International Conference on Image Processing (ICIP), 2015)
This paper presents three new efficient 2×2 block-based algorithms for connected components labeling: a two-scan which assigns provisional labels to blocks, a two-scan which assigns provisional labels to pixels and a one-and-a-half-scan which assigns provisional labels to blocks. A new stripe image representation is designed in order to perform the second pass only through the blocks containing some foreground pixel. We also improved the existing 2×2 block-based algorithms by utilizing information of a pixel during a transition in the mask, which allows checking of four neighbor pixels in the mask at most. Thus, the average number of checking operations needed to inspect the neighbor pixels in the first scan is reduced from 1.459 to 1.156, an improvement of 21%. We conducted experiments using synthetic and real images to evaluate the performance of the proposed methods compared to the existing methods. The proposed block-based one-and-a-half-scan algorithm presents the best performance in the real images dataset, which is composed of 1290 documents. Our block-based two-scan algorithm which assigns provisional labels to pixels showed to be the fastest in the synthetic dataset, especially in high density images.