Based on detailed analysis of advantages and disadvantages of the existing connected-component labeling (CCL) algorithm,a new algorithm for binary connected components labeling based on run-length encoding (RLE) a...Based on detailed analysis of advantages and disadvantages of the existing connected-component labeling (CCL) algorithm,a new algorithm for binary connected components labeling based on run-length encoding (RLE) and union-find sets has been put forward.The new algorithm uses RLE as the basic processing unit,converts the label merging of connected RLE into sets grouping in accordance with equivalence relation,and uses the union-find sets which is the realization method of sets grouping to solve the label merging of connected RLE.And the label merging procedure has been optimized:the union operation has been modified by adding the "weighted rule" to avoid getting a degenerated-tree,and the "path compression" has been adopted when implementing the find operation,then the time complexity of label merging is O(nα(n)).The experiments show that the new algorithm can label the connected components of any shapes very quickly and exactly,save more memory,and facilitate the subsequent image analysis.展开更多
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...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.展开更多
文摘Based on detailed analysis of advantages and disadvantages of the existing connected-component labeling (CCL) algorithm,a new algorithm for binary connected components labeling based on run-length encoding (RLE) and union-find sets has been put forward.The new algorithm uses RLE as the basic processing unit,converts the label merging of connected RLE into sets grouping in accordance with equivalence relation,and uses the union-find sets which is the realization method of sets grouping to solve the label merging of connected RLE.And the label merging procedure has been optimized:the union operation has been modified by adding the "weighted rule" to avoid getting a degenerated-tree,and the "path compression" has been adopted when implementing the find operation,then the time complexity of label merging is O(nα(n)).The experiments show that the new algorithm can label the connected components of any shapes very quickly and exactly,save more memory,and facilitate the subsequent image analysis.
基金supported in part by the Grant-in-Aid for Scientific Research (C) of the Ministry of Education, Science, Sports and Culture of Japan under Grant No. 23500222
文摘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.