A general approach to connected-component labeling for arbitrary image representations

An improved and general approach to connected-component labeling of images is presented. The algorithm presented in this paper processes images in predetermined order, which means that the processing order depends only on the image representation scheme and not on specific properties of the image. The algorithm handles a wide variety of image representation schemes (rasters, run lengths, quadrees, bintrees, etc.). How to adapt the standard UNION-FIND algorithm to permit reuse of temporary labels is shown. This is done using a technique called age balancing, in which, when two labels are merged, the older label becomes the father of the younger label. This technique can be made to coexist with the more conventional rule of weight balancing, in which the label with more descendants becomes the father of the label with fewer descendants. Various image scanning orders are examined and classified. It is also shown that when the algorithm is specialized to a pixel array scanned in raster order, the total processing time is linear in the number of pixels. The linear-time processing time follows from a special property of the UNION-FIND algorithm, which may be of independent interest. This property states that under certain restrictions on the input, UNION-FIND runs in time linear in the number of FIND and UNION operations. Under these restrictions, linear-time performance can be achieved without resorting to the more complicated Gabow-Tarjan algorithm for disjoint set union.

[1]  J. Hopcroft,et al.  Efficient algorithms for graph manipulation , 1971 .

[2]  RosenfeldAzriel,et al.  Sequential Operations in Digital Picture Processing , 1966 .

[3]  Hanan Samet,et al.  Efficient Component Labeling of Images of Arbitrary Dimension Represented by Linear Bintrees , 1988, IEEE Trans. Pattern Anal. Mach. Intell..

[4]  Jan van Leeuwen,et al.  Worst-case Analysis of Set Union Algorithms , 1984, JACM.

[5]  Hanan Samet,et al.  Connected Component Labeling Using Quadtrees , 1981, JACM.

[6]  Azriel Rosenfeld,et al.  Digital Picture Processing , 1976 .

[7]  J. Hopcroft,et al.  Algorithm 447: efficient algorithms for graph manipulation , 1973, CACM.

[8]  Azriel Rosenfeld,et al.  Sequential Operations in Digital Picture Processing , 1966, JACM.

[9]  Hanan Samet,et al.  The Design and Analysis of Spatial Data Structures , 1989 .

[10]  Azriel Rosenfeld,et al.  Connectivity and genus in three dimensions , 1971 .

[11]  Robert E. Tarjan,et al.  Efficiency of a Good But Not Linear Set Union Algorithm , 1972, JACM.

[12]  Alfred V. Aho,et al.  The Design and Analysis of Computer Algorithms , 1974 .

[13]  Robert E. Tarjan,et al.  A linear-time algorithm for a special case of disjoint set union , 1983, J. Comput. Syst. Sci..

[14]  Linda G. Shapiro,et al.  A new connected components algorithm for virtual memory computers , 1983, Comput. Vis. Graph. Image Process..

[15]  SametHanan The Quadtree and Related Hierarchical Data Structures , 1984 .

[16]  Ronald Lumia A new three-dimensional connected components algorithm , 1983, Comput. Vis. Graph. Image Process..