Abstract
This paper presents a major reformulation of a widely used solution for computing the exact Euclidean distance transform of n-dimensional discrete binary shapes. Initially proposed by Hirata, the original algorithm is linear in time, separable, and easy to implement. Furthermore, it accounts for the fastest existing solutions, leading to its widespread use in the state of the art, especially in real-time applications. In particular, we focus on the second step of this algorithm, where the lower envelope of a set of parabolas has to be computed. By leveraging the discrete nature of images, we show that some of those parabolas can be merged into line segments. It reduces the computational cost of the algorithm by about 20% in most practical cases, while maintaining its exactness. To evaluate the proposed improvement on different cases, two state-of-the art benchmarks are implemented and discussed.
Similar content being viewed by others
References
Rosenfeld, A., Pfaltz, J.L.: Distance functions on digital pictures. Pattern Recogn. 1(1), 33–61 (1968)
Fabbri, R., da Fontoura-Costa, L., Torelli, J.C., Bruno, O.M.: Ad Euclidean distance transform algorithms: a comparative survey. ACM Comput. Surv. 40(1), 1–2 (2008)
Hirata, T.: A unified linear-time algorithm for computing distance maps. Inf. Process. Lett. 58(3), 129–133 (1996)
Saito, T., Toriwaki, J.I.: New algorithms for Euclidean distance transformation of an n-dimensional digitized picture with applications. Pattern Recogn. 27(11), 1551–1565 (1994)
Leal, J., Ramírez-Torres, J., Barron-Zambrano, J., Diaz-Manriquez, A., Nuño-Maganda, M.A., Saldivar-Alonso, V.: Parallel raster scan for Euclidean distance transform. Symmetry (2020). https://doi.org/10.3390/sym12111808
Manduhu, M., Jones, M.W.: A work efficient parallel algorithm for exact Euclidean distance transform. IEEE Trans. Image Process. 28(11), 5322–5335 (2019)
Montanari, U.: A method for obtaining skeletons using a quasi-Euclidean distance. J. ACM (JACM) 15, 600–624 (1968)
Danielsson, P.E.: Euclidean distance mapping. Comput. Graphics Image Process. 14(3), 227–248 (1980). https://doi.org/10.1016/0146-664X(80)90054-4
Borgefors, G.: Distance transformations in arbitrary dimensions. Comput. Vis. Graphics Image Process. 27(3), 321–345 (1984). https://doi.org/10.1016/0734-189X(84)90035-5
Cuisenaire, O., Macq, B.M.: Fast Euclidean distance transformation by propagation using multiple neighborhoods. Comput. Vis. Image Underst. 76, 163–172 (1999)
Shih, F.Y., Wu, Y.T.: Fast Euclidean distance transformation in two scans using a 3\(\times\)3 neighborhood. Comput. Vis. Image Underst. 93(2), 195–205 (2004)
Strutz, T.: The distance transform and its computation (2021)
Breu, H., Gil, J., Kirkpatrick, D.G., Werman, M.: Linear time Euclidean distance algorithms. IEEE Trans. Pattern Anal. Mach. Intell. 17(5), 529–533 (1995)
Guan, W., Ma, S.: A list-processing approach to compute Voronoi diagrams and the Euclidean distance transform. IEEE Trans. Pattern Anal. Mach. Intell. 20(7), 757–761 (1998)
Maurer, C.R., Qi, R., Raghavan, V., Member, S.: A linear time algorithm for computing exact Euclidean distance transforms of binary images in arbitrary dimensions. IEEE Trans. Pattern Anal. Mach. Intell. 25, 265–270 (2003)
Wang, J., Tan, Y.: Efficient Euclidean distance transform algorithm of binary images in arbitrary dimensions. Pattern Recogn. 46(1), 230–242 (2013)
Shih, F.Y., Mitchell, O.R.: A mathematical morphology approach to Euclidean distance transformation. IEEE Trans. Image Process. 1(2), 197–204 (1992)
Lotufo, R., Zampirolli, F.A.: Fast multidimensional parallel Euclidean distance transform based on mathematical morphology. In: 14th Brazilian Symposium on Computer Graphics and Image Processing (SIBGRAPI 2001), 15–18 October 2001, Florianopolis, Brazil, pp. 100–105 (2001)
Meijster, A., Roerdink, J.B.T.M., Hesselink, W.H.: A general algorithm for computing distance transforms in linear time. In: International Symposium on Mathematical Morphology and its Applications to Image and Signal Processing, ISMM 2000, Palo Alto, CA, USA, June 26–28, 2000, pp. 331–340 (2000)
Felzenszwalb, P.F., Huttenlocher, D.P.: Distance transforms of sampled functions. Theory Comput. 8(1), 415–428 (2012)
Coeurjolly, D., Montanvert, A.: Optimal separable algorithms to compute the reverse Euclidean distance transformation and discrete medial axis in arbitrary dimension. IEEE Trans. Pattern Anal. Mach. Intell. 29(3), 437–448 (2007)
Lucet, Y.: A linear Euclidean distance transform algorithm based on the linear-time Legendre transform. In: Second Canadian Conference on Computer and Robot Vision (CRV 2005), 9–11 May 2005, Victoria, BC, Canada, pp. 262–267 (2005)
Schouten, T.E., van den Broek, E.L.: Fast exact Euclidean distance (FEED): a new class of adaptable distance transforms. IEEE Trans. Pattern Anal. Mach. Intell. 36(11), 2159–2172 (2014)
Schouten, T., Kuppens, C.H., van den Broek, E.L.: Three dimensional fast exact Euclidean distance (3d-feed) maps. Pattern Recogn. Lett. PRL (2006). https://doi.org/10.1117/12.643721
Sebastian, T.B., Kimia, B.B.: Curves vs. skeletons in object recognition. Signal Process. 85(2), 247–263 (2005)
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work was partially supported by Valeo.
Rights and permissions
About this article
Cite this article
Fuseiller, G., Marie, R., Mourioux, G. et al. Enhancing distance transform computation by leveraging the discrete nature of images. J Real-Time Image Proc 19, 763–773 (2022). https://doi.org/10.1007/s11554-022-01221-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11554-022-01221-3