Fastest available algorithm for distance transform

This paper reviews the known exact distance transform algorithms:

“2D Euclidean distance transform algorithms: A comparative survey”
https://rfabbri.github.io/stuff/fabbri-EDT-survey-ACMCSurvFeb2008.pdf

The fastest exact distance transform is from Meijster:

“A General Algorithm for Computing Distance Transforms in Linear Time.”
http://fab.cba.mit.edu/classes/S62.12/docs/Meijster_distance.pdf

The design of the algorithm is particularly well suited for parallel calculation.

This is implemented in my open source library which tries to emulate Photoshop’s “Layer Style:”

https://github.com/vinniefalco/LayerEffects

Leave a Comment