A General Algorithm for Computing Distance Transforms in Linear Time

  • A. Meijster
  • J. B. T. M. Roerdink
  • W. H. Hesselink
Part of the Computational Imaging and Vision book series (CIVI, volume 18)


A new general algorithm for computing distance transforms of digital images is presented. The algorithm consists of two phases. Both phases consist of two scans, a forward and a backward scan. The first phase scans the image column-wise, while the second phase scans the image row-wise. Since the computation per row (column) is independent of the computation of other rows (columns), the algorithm can be easily parallelized on shared memory computers. The algorithm can be used for the computation of the exact Euclidean, Manhattan (L 1 norm), and chessboard distance (L norm) transforms.

Key words

Distance Transforms Row-Column Factorization Parallelization 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    G. Borgefors. Distance transformations in arbitrary dimensions. Computer Vision, Graphics, and Image Processing, 27:321–345, 1984.Google Scholar
  2. 2.
    G. Borgefors. Distance transformations in digital images. Computer Vision, Graphics, and Image Processing, 34:344–371, 1986.Google Scholar
  3. 3.
    P. Danielsson. Euclidean distance mapping. Comput. Graphics Image Process., 14:227–248, 1980.CrossRefGoogle Scholar
  4. 4.
    W._H. Hesselink, A. Meijster, and J. B. T. M. Roerdink. An exact Euclidean distance transform in linear time. Technical Report IWI 99-9-04, Institute for Mathematics and Computing Science, University of Groningen, the Netherlands, Apr. 1999.Google Scholar
  5. 5.
    M. Kolountzakis and K. Kutulakos. Fast computation of the Euclidean distance maps for binary images. Information Processing Letters, 43:181–184, 1992.CrossRefMathSciNetzbMATHGoogle Scholar
  6. 6.
    S. Pavel and A. Akl. Efficient algorithms for the Euclidean distance transform. Parallel Processing Letters, 5:205–212, 1995.CrossRefMathSciNetGoogle Scholar
  7. 7.
    A. Rosenfeld and J. Pfaltz. Distance functions on digital pictures. Pattern Recognition, 1:33–61, 1968.CrossRefMathSciNetGoogle Scholar

Copyright information

© Kluwer Academic/Plenum Publishers 2002

Authors and Affiliations

  • A. Meijster
    • 1
  • J. B. T. M. Roerdink
    • 1
  • W. H. Hesselink
    • 1
  1. 1.University of GroningenGroningenThe Netherlands

Personalised recommendations