Transform one curve into another

1k Views Asked by At

I have been working on something for a while now, and I can't really get my head around it. I consider two curves with data points and want to determine the most optimal transform from one to another.

As an example I consider: Curves

I have been looking into different shortest path algorithms (Floyd–Warshall, Dijkstra, A*, etc) but these (as far as I understand) consider nodes and their interconnectedness, and not matrices.

The two curves I consider consists of N1/N2 data points in vector forms X1,Y1 and X2,Y2. In MatLAB I use meshgrid to change X1,X2 and Y1,Y2 into matrices that can be used in further calculations. Then I calculate the distance matrix (or landscape) by saying $$D = \sqrt{(X1-X2)^2+(Y1-Y2)^2}$$

I want to use the distance landscape to determine the "shortest path" to transform one curve into another.

Distance landscape

I am interested in calculating something like the "white line". I have looked at calculating the Frechet distance and using obstacle avoidance, but it does not work as I intend (Frechet distance is a global parameter, and I want locally optimized).

I have included the distance landscape I am considering. Can anyone please enlighten me?

EDIT

I have been looking at the whole "we have a landscape and we want to find the lowest effort-way of getting from A to B", and then I suddenly saw the concept of obtaining the Minimum Energy Path (MEP) (see figure)

Test

Does anyone know about this and how it applies to my problem?