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

Michael B. Dillencourt, Hannan Samet, Markku Tamminen
1992 Journal of the ACM  
An improved and general approach to connected-component labeling of images is presented. The algorithm presented in this paper processes images in predeterttuned 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, quadtrees, bintrees, etc.). How to adapt the standard UNION-FIND algorithm to permit reuse of
more » ... se of tempora~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 wetghf 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-FINDalgorithm, which maybe of independent interest. This property states that under certain restrictions on the input, UNION-FINDruns in time linear in the number of FIND and UNIONoperations. Under these restrictions, linear-time performance can be achieved without resorting to the more complicated Gabow-Tarj an algorithm for disjoint set union. Science,
doi:10.1145/128749.128750 fatcat:wm3zp2fyyngvlgalco3rc5gqja