Mathematical Morphology and its Applications to Image and Signal Processing

Volume 18 of the series Computational Imaging and Vision pp 331-340

A General Algorithm for Computing Distance Transforms in Linear Time

  • A. MeijsterAffiliated withUniversity of Groningen
  • , J. B. T. M. RoerdinkAffiliated withUniversity of Groningen
  • , W. H. HesselinkAffiliated withUniversity of Groningen

* Final gross prices may vary according to local VAT.

Get Access


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