taigw / GeodisTK

geodesic distance transform of 2d/3d images
MIT License
130 stars 35 forks source link

Understanding the speed parameters #8

Closed masadcv closed 2 years ago

masadcv commented 3 years ago

Hi @taigw,

I am trying to understand how the implemented equation with speed parameter relate to the original geodesic distance equation in the paper.

More particularly the line in question is: https://github.com/taigw/GeodisTK/blob/7907b3874c5e19d10b056f8de39e443cb7f221c2/cpp/geodesic_distance_2d.cpp#L191

This seems different from Equation 2 and Figure 12 of: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/Criminisi_eccv2008.pdf

Can you guide me on the derivation that relates this back to the gradient as in Figure 12?

Many thanks! Muhammad

taigw commented 3 years ago

Hi @masadcv , This implementation gives a generalization of Euclidean and Geodesic distance. In the original paper, the hyper-parameter gamma in figure 12 makes the equation always contain the Euclidean term. This repository used another hyper-parameter lambda, so that the output only depends on the spatial distance when lambda is 0, and becomes purely dependent on the integration of intensity differences when lambda is 1.