Generalized distance transform
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.
Citation pour cette source
Ryan (2024). Generalized distance transform (https://www.mathworks.com/matlabcentral/fileexchange/31581-generalized-distance-transform), MATLAB Central File Exchange. Récupéré le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxCatégories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0.0 |