Gray-weighted distance transform of grayscale image
graydist
uses the geodesic time algorithm [1]. The basic equation for geodesic
time along a path is:
method
determines the chamfer weights that are assigned to the local
neighborhood during outward propagation. Each pixel's contribution to the geodesic time is
based on the chamfer weight in a particular direction multiplied by the pixel
intensity.
[1] Soille, P. "Generalized geodesy via geodesic time." Pattern Recognition Letters. Vol.15, December 1994, pp. 1235–1240.