This page contains free (GNU GPL v3+) source code for Matlab implementations of our anti-aliased Euclidean distance transform, as presented in Pattern Recognition Letters January 2011.
There is an errata sheet that fixes some unfortunate typos in equations (2) and (3).
The archive below contains C and C++ files in MEX format for Matlab or Octave. They should work on all platforms supported by either Matlab and Octave. To use the functions, unpack the files in the working directory and type e.g. "mex edtaa.c". The Matlab wrapper for the "edtaa" MEX function is "edtaa.c", and the reusable generic C function is in "edtaafunc.c". Several implementations are provided, with different accuracy and speed as presented in the article:
An archive with all these files can be downloaded by the following link:
http://www.itn.liu.se/~stegu76/edtaa/edtaa.zip
Stefan Gustavson (stegu76@itn.liu.se), Robin Strand (robin@cb.uu.se), 2010-09-23