Skip to main content
Log in

Enhancing distance transform computation by leveraging the discrete nature of images

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

Notes

  1. http://www.github.com/RomMarie/EnhancedDT.

References

  1. Rosenfeld, A., Pfaltz, J.L.: Distance functions on digital pictures. Pattern Recogn. 1(1), 33–61 (1968)

    Article  MathSciNet  Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. Hirata, T.: A unified linear-time algorithm for computing distance maps. Inf. Process. Lett. 58(3), 129–133 (1996)

    Article  MathSciNet  Google Scholar 

  4. 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)

    Article  Google Scholar 

  5. 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

    Article  Google Scholar 

  6. Manduhu, M., Jones, M.W.: A work efficient parallel algorithm for exact Euclidean distance transform. IEEE Trans. Image Process. 28(11), 5322–5335 (2019)

    Article  MathSciNet  Google Scholar 

  7. Montanari, U.: A method for obtaining skeletons using a quasi-Euclidean distance. J. ACM (JACM) 15, 600–624 (1968)

    Article  Google Scholar 

  8. 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

    Article  Google Scholar 

  9. 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

    Article  Google Scholar 

  10. Cuisenaire, O., Macq, B.M.: Fast Euclidean distance transformation by propagation using multiple neighborhoods. Comput. Vis. Image Underst. 76, 163–172 (1999)

    Article  Google Scholar 

  11. 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)

    Article  Google Scholar 

  12. Strutz, T.: The distance transform and its computation (2021)

  13. 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)

    Article  Google Scholar 

  14. 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)

    Article  Google Scholar 

  15. 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)

    Article  Google Scholar 

  16. Wang, J., Tan, Y.: Efficient Euclidean distance transform algorithm of binary images in arbitrary dimensions. Pattern Recogn. 46(1), 230–242 (2013)

    Article  Google Scholar 

  17. Shih, F.Y., Mitchell, O.R.: A mathematical morphology approach to Euclidean distance transformation. IEEE Trans. Image Process. 1(2), 197–204 (1992)

    Article  Google Scholar 

  18. 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)

  19. 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)

  20. Felzenszwalb, P.F., Huttenlocher, D.P.: Distance transforms of sampled functions. Theory Comput. 8(1), 415–428 (2012)

    Article  MathSciNet  Google Scholar 

  21. 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)

    Article  Google Scholar 

  22. 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)

  23. 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)

    Article  Google Scholar 

  24. 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

    Article  Google Scholar 

  25. Sebastian, T.B., Kimia, B.B.: Curves vs. skeletons in object recognition. Signal Process. 85(2), 247–263 (2005)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Romain Marie.

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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11554-022-01221-3

Keywords

Mathematics Subject Classification

Navigation