Abstract
The application of a technique for labelling connected components based on the classical recursive technique is studied. The recursive approach permits labelling, counting, and characterizing objects with a single pass. Its main drawback lies on its very nature: Big objects require a high number of recursive calls, which require a large stack to store local variables and register values. Thus, the risk of stack overflow imposes an impractical limit on image size. The hybrid alternative combines recursion with iterative scanning and can be directly substituted into any program already using the recursive technique. I show how this alternative drastically reduces the number of consecutive recursive calls, and thus the required stack size, while improving overall performance. The method is tested on sets of uniform random binary images and binary images with a random distribution of overlapping square blocks. These test sets provide insight on the adequacy of the algorithm for different applications. The performance of the proposed technique is compared with the classical recursive technique and with an iterative two-pass algorithm using the Union-Find data structure, and the results show an overall increase of speed. The performance of the algorithm in real world machine vision applications is also shown.
References
Alnuweiri H.M., Prasanna V.K. (1992) Parallel architectures and algorithms for image component labelling. IEEE Trans. Pattern Anal. Mach. Intell. 14, 1014–1034
Luger G.F., Stubblefield W.A. (1993) Artificial Intelligence: Structures and Strategies for Complex Problem Solving (2nd edn). Chapman Hall, New York
Tarjan R.E. (1972) Depth-first search and linear graph algorithms. SIAM J. Comput. 1, 146–160
Brice C.R., Fennema C.L. (1970) Scene analysis using regions. Artif. Intell. 1(3–4): 205–226
Rosenfeld A., Pfaltz J. (1966) Sequential operations in digital picture processing. J. Assoc. Comput. Mach. 13, 471–494
Hoshen J., Kopelman R. (1976) Percolation and cluster distribution: cluster multiple labelling technique and critical concentration algortihm. Phys. Rev. B 14: 3438
Rosenfeld A., Kak A.C. (1982) Digital Picture Processing. Academic Press, San Diego
Haralick R.H. (1981) Some neighborhood operations. In: Onoe M., Preston K., Rosenfeld A. (eds) Real Time/Parallel Computing Image Analysis. Plenum Press, New York
Lumia R., Shapiro L., Zuniga O. (1983) A new connected components algorithm for virtual memory computers. Comput. Vision Graph Image Process. 22, 287–300
Dillencourt M.B., Samet H., Tamminen M. (1992) A general approach to connected-component labeling for arbitrary image presentations. J. Assoc. Comput. Mach. 39, 253–280
Hoshen J., Berry M.W., Minser K.S. (1997) Percolation and cluster structure parameters: the enhanced Hoshen–Kopelman algorithm. Phys. Rev. E. 56: 1455
Hoshen J. (1998) On the application of the enhanced Hoshen–Kopelman algorithm for image analysis. Pattern Recogn. Lett. 12, 575–584
Martí n-Herrero J. (2004) Hybrid cluster identification. J. Phys. A: Math. Gen. 37, 9377–9386
Metropolis N., Rosenbluth A., Rosenbluth M., Teller A., Teller E. (1953) Equations of state calculations by fast computing machines. J. Chem. Phys. 21, 1087–1091
Martí n-Herrero J., Peón-Fernández J. (2005) Computation of longwave electromagnetic response of nonhomogeneous media. IEEE Trans. Geosci. Rem. Sens. 43(7): 1479–1489
Tarjan R.E. (1975) Efficiency of a good but not linear set union algorithm. J. Assoc. Comput. Mach. 22, 215–225
Shapiro L.G., Stockman G.C. (2001) Computer Vision. Prentice Hall, New Jersey
Martí n-Herrero J., Alba-Castro J.L. (2003) High speed machine vision: The canned tuna case. In: Billingsley J. (ed.) Mechatronics and Machine Vision in Practice: Future Trends. Research Studies Press, Hertfordshire
Martí n-Herrero J., Ferreiro-Armán M., Alba-Castro J.L. (2004) A SOFM improves a real time quality assurance machine vision system, In: IEEE Proceedings of the 17th International Conference on Pattern Recognition ICPR’04. 4, 301–304
Stroustrup B. (1997) The C++ Programming Language. Addison-Wesley, New York
With K.A. (1997) The application of neutral landscape models in conservation biology. Conserv. Biol. 11, 1069–1080
Stauffer D., Aharony A. (1994) Introduction to Percolation Theory. Taylor and Francis, London
With K.A. (2002) Using percolation theory to assess landscape connectivity and effects of habitat fragmentation. In: Gutzwiller K.J. (ed.) Applying Landscape Ecology in Biological Conservation. Springer-Verlag, Berlin Heidelberg New York
Moilanen A., Hanski I. (2001) On the use of connectivity measures in spatial ecology. Oikos 95, 147–151
Kearney M.J. (2002) Compact directed percolation with modified boundary rules: a forest fire model. J. Phys. A: Math. Gen. 35, L421–L425
Hartley H. (1958) Maximum likelihood estimation from incomplete data. Biometrics 14, 174–194
Dempster A., Laird N., Rubin D. (1977) Maximum likelihood from incomplete data via the EM algorithm. J. Royal Stat. Soc. B 39(1): 1–38
Coindreau O., Cloetens P., Vignoles G.L. (2003) Direct 3D microscale imaging of C/C composites with computed holotomography. Nucl. Instrum. Methods Phys. Res., Sect. B, 200, 295–302
Lavaud J.-F., El Hadi R., Vignoles G., Pailler R. (1998) The thermal gradient – pulse flow CVI process: a new chemical vapor infiltration technique for the densification of preforms. J. Eur. Ceram. Soc. 18, 857–870
Perona P., Malik J. (1990) Scale-space and edge detection using anisotropic difussion, IEEE Trans. Pat. Anal. Mach. Intel. 12, 629–639
Weickert J. (1999) Coherence-enhancing diffusion filtering. Int. J. Comp. Vis. 31(2/3): 111–127
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Martín-Herrero, J. Hybrid object labelling in digital images. Machine Vision and Applications 18, 1–15 (2007). https://doi.org/10.1007/s00138-006-0041-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00138-006-0041-3