Dynamic programming

It consists in defining a potential phi at all points on the image,

calculating the sum of that potential along every curve of the image,

and looking for the path that provides the minimum sum between two given points.

The path obtained is not necessarily the shortest in the sense of the euclidean distance, but it does correspond to the structure sought. The F* algorithm developed by Fischler can be used to find this path in an optimal way.