%A Li-Feng He, Yu-Yan Chao, and Kenji Suzuki
%T An Algorithm for Connected-Component Labeling, Hole Labeling and Euler Number Computing
%0 Journal Article
%D 2013
%J Journal of Computer Science and Technology
%R 10.1007/s11390-013-1348-y
%P 468-478
%V 28
%N 3
%U {https://jcst.ict.ac.cn/CN/abstract/article_1957.shtml}
%8 2013-05-05
%X Labeling connected components and holes and computing the Euler number in a binary image are necessary for image analysis, pattern recognition, and computer (robot) vision, and are usually made independently of each other in conventional methods. This paper proposes a two-scan algorithm for labeling connected components and holes simultaneously in a binary image by use of the same data structure. With our algorithm, besides labeling, we can also easily calculate the number and the area of connected components and holes, as well as the Euler number. Our method is very simple in principle, and experimental results demonstrate that our method is much more efficient than conventional methods for various kinds of images in cases where both labeling and Euler number computing are necessary.