Main Content

Gray-weighted distance transform of grayscale image

`graydist`

uses the geodesic time algorithm [1]. The basic equation for geodesic
time along a path is:

$${\tau}_{f}\left(P\right)=\frac{f\left({p}_{o}\right)}{2}+\frac{f\left({p}_{l}\right)}{2}+{\displaystyle \sum _{i=1}^{l-1}f\left({p}_{i}\right)}$$

`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.