Generalized distance transform

Version 1.0.0.0 (2.91 KB) by Ryan
Calculates the Generalized Distance Transform of a set of points.
1K Downloads
Updated 26 May 2011

View License

This is a simple MATLAB implementation of the generalized distance transform algorithm from the paper Distance Transforms of Sampled Functions by P. Felzenszwalb and D. Huttenlocher. The function DT() gives the distance transform of a 2D image by calling DT1() for each dimension. By using DT1(), this could be easily extended to higher dimensions. It seems to have problems with inf values, so for points in the image with "no" parabola centered there, they should instead be given a large numeric value (such as 1e10). I also modified the algorithm so that the second argument returns the power diagram of the input. The power diagram is a diagram where each point is assigned to the point that is closest to it with respect to the distance transform. If all input points have the same value, this function reduces to giving the standard distance transform and the Voronoi diagram.

Cite As

Ryan (2024). Generalized distance transform (https://www.mathworks.com/matlabcentral/fileexchange/31581-generalized-distance-transform), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Voronoi Diagram in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0.0