Skip to main content
Log in

Linear Time Algorithms for Exact Distance Transform

  • Published:
Journal of Mathematical Imaging and Vision Aims and scope Submit manuscript

Abstract

In 2003, Maurer et al. (IEEE Trans. Pattern Anal. Mach. Intell. 25:265–270, 2003) published a paper describing an algorithm that computes the exact distance transform in linear time (with respect to image size) for the rectangular binary images in the k-dimensional space ℝk and distance measured with respect to L p -metric for 1≤p≤∞, which includes Euclidean distance L 2. In this paper we discuss this algorithm from theoretical and practical points of view. On the practical side, we concentrate on its Euclidean distance version, discuss the possible ways of implementing it as signed distance transform, and experimentally compare implemented algorithms. We also describe the parallelization of these algorithms and discuss the computational time savings associated with them. All these implementations will be made available as a part of the CAVASS software system developed and maintained in our group (Grevera et al. in J. Digit. Imaging 20:101–118, 2007). On the theoretical side, we prove that our version of the signed distance transform algorithm, GBDT, returns the exact value of the distance from the geometrically defined object boundary. We provide a complete proof (which was not given of Maurer et al. (IEEE Trans. Pattern Anal. Mach. Intell. 25:265–270, 2003) that all these algorithms work correctly for L p -metric with 1<p<∞. We also point out that the precise form of the algorithm from Maurer et al. (IEEE Trans. Pattern Anal. Mach. Intell. 25:265–270, 2003) is not well defined for L 1 and L metrics. In addition, we show that the algorithm can be used to find, in linear time, the exact value of the diameter of an object, that is, the largest possible distance between any two of its elements.

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.

Similar content being viewed by others

References

  1. Bai, X., Latecki, L.J., Liu, W.: Skeleton pruning by contour partitioning with discrete curve evolution. IEEE Trans. Pattern Anal. Mach. Intell. 29(3), 449–462 (2007)

    Article  Google Scholar 

  2. Beristain, A., Grana, M.: Pruning algorithm for Voronoi skeletons. Electron. Lett. 46(1), 39–41 (2010)

    Article  Google Scholar 

  3. Cuisenaire, O.: Distance transformations: fast algorithms and applications to medical image processing. Dissertation (1999)

  4. Grevera, G.J.: Distance transform. In: Suri, J.S., Farag, A. (eds.) Parametric and Geometric Deformable Models: An Application in Biomaterials and Medical Imagery. Springer, Berlin

  5. Grevera, G.J., Udupa, J.K.: Shape-based interpolation of multidimensional grey-level images. IEEE Trans. Med. Imaging 15(6), 881–892 (1996)

    Article  Google Scholar 

  6. Grevera, G., Udupa, J., Odhner, D., Zhuge, Y., Souza, A., Iwanaga, T., Mishra, S.: CAVASS: a computer assisted visualization and analysis software system. J. Digit. Imaging 20(1), 101–118 (2007)

    Article  Google Scholar 

  7. Herman, G.T., Zheng, J., Bucholtz, C.A.: Shape-based interpolation. IEEE Comput. Graph. Appl. 12(3), 69–79 (1992)

    Article  Google Scholar 

  8. Maurer, C.R. Jr., Qi, R., Raghavan, V.: A linear time algorithm for computing exact Euclidean distance transforms of binary images in arbitrary dimensions. IEEE Trans. Pattern Anal. Mach. Intell. 25(2), 265–270 (2003)

    Article  Google Scholar 

  9. Pizer, S.M., Gerig, G., Joshi, S.C., Aylward, S.R.: Multiscale medial shape-based analysis of image objects. Proc. IEEE 91(10), 1670–1679 (2003)

    Article  Google Scholar 

  10. Raya, S.P., Udupa, J.K.: Shape-based interpolation of multidimensional objects. IEEE Trans. Med. Imaging 9(1), 32–42 (1990)

    Article  Google Scholar 

  11. Royden, H.L.: Real Analysis. MacMillan, New York (1988)

    MATH  Google Scholar 

  12. Tustison, N.J., Siqueira, M., Gee, J.C.: N-D linear time exact signed Euclidean distance transform. Insight J., January–June (2006). http://hdl.handle.net/1926/171

  13. Udupa, J.K.: Multidimensional digital boundaries. Graph. Models Image Process. 56(4), 311–323 (1994)

    Article  Google Scholar 

  14. Udupa, J.K., Grevera, G.J.: Go digital, go fuzzy. Pattern Recognit. Lett. 23, 743–754 (2002)

    Article  MATH  Google Scholar 

  15. Ge, Y., Fitzpatrick, J.M.: On the generation of skeletons from discrete Euclidean distance maps. IEEE Trans. PAMI 18(11), 1055–1066 (1996)

    Google Scholar 

  16. da Fontoura Costa, L.: Robust skeletonization through exact Euclidean distance transform and its application to neuromorphometry. Real-Time Imaging 6(6), 415–431 (2000)

    Article  MATH  Google Scholar 

  17. Souza, A., Udupa, J.K.: Automatic landmark selection for active shape models. Proc. SPIE Med. Imaging 5747, 1377–1383 (2005)

    Google Scholar 

  18. Tsai, A., Well, W., Tempany, C., Grimson, E., Willsky, A.: Mutual information in coupled multi-shape model for medical image segmentation. Med. Image Anal. 8(4), 429–445 (2004)

    Article  Google Scholar 

  19. Marai, G.E., Laidlaw, D.H., Crisco, J.J.: Super-resolution registration using tissue-classified distance fields. IEEE Trans. Med. Imaging 25(2), 177–187 (2006)

    Article  Google Scholar 

  20. Nyul, L.G., Udupa, J.K., Saha, P.K.: Incorporating a measure of local scale in voxel-based 3-D image registration. IEEE Trans. Med. Imaging 22, 228–237 (2003)

    Article  Google Scholar 

  21. Theresse, P., Arbuck, S.G., Eisenhauer, E.A., et al.: New guidelines to evaluate the response to treatment in solid tumors, European Organization for Research and Treatment of Cancer, National Cancer Institute of the United States. J. Nat. Cancer Inst. 92, 205–216 (2000)

    Article  Google Scholar 

  22. Intel Pentium D 800 Processor 800 Sequence Datasheet (download.intel.com/support/processors/pentiumd/sb/307506.pdf), 2006

  23. Díaz De León S., J.L., Sossa-Azuela, J.H.: Mathematical morphology based on linear combined metric spaces on Z 2 (Part I): fast distance transforms. J. Math. Imaging Vis. 12(2), 137–154 (2000)

    Article  Google Scholar 

  24. Mehnert, A.J.H., Jackway, P.T.: On computing the exact Euclidean distance transform on rectangular and hexagonal grids. J. Math. Imaging Vis. 11(3), 223–230 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  25. Xu, M., Pycock, D.: A scale-space medialness transform based on boundary concordance voting. J. Math. Imaging Vis. 11(3), 277–299 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  26. Kimmel, R., Kiryati, N., Bruckstein, A.M.: Sub-pixel distance maps and weighted distance transforms. J. Math. Imaging Vis. 6(2–3), 223–233 (1996)

    Article  MathSciNet  Google Scholar 

  27. Teixeira, R.C.: Medial axes and mean curvature motion II: Singularities. J. Math. Imaging Vis. 23(1), 87–105 (2005)

    Article  MathSciNet  Google Scholar 

  28. Choi, S.W., Seidel, H.-P.: Linear one-sided stability of MAT for weakly injective domain. J. Math. Imaging Vis. 17(3), 237–247 (2002)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Krzysztof Chris Ciesielski.

Additional information

J.K. Udupa was partially supported by NIH grant R01-EB004395.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Ciesielski, K.C., Chen, X., Udupa, J.K. et al. Linear Time Algorithms for Exact Distance Transform. J Math Imaging Vis 39, 193–209 (2011). https://doi.org/10.1007/s10851-010-0232-4

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10851-010-0232-4

Keywords

Navigation