Fréchet distance of 2 trajectories
Asked Answered
M

2

8

Good Day,

I have two different paths in a 2D plane. I want to compare these two paths with the Fréchet Distance.

I know some points of the trajectories, each is connected to another point with a straight line.

What's the smartest way to get the Fréchet Distance? Any hints? I'm working in Python.

Meson answered 7/9, 2016 at 15:56 Comment(0)
U
0

You can use implemetation from here https://pypi.org/project/frechetdist/ or from here https://pypi.org/project/similaritymeasures/

Generally speaking, when you measure Frechet distance you can always (in the terminology of walking person and dog)

  • A. move person further,
  • B. move your dog further,
  • C. move both further,

At each step you can do A, B, C get minimum(A,B,C) and append to results list. After finishing both trajectories get max() of your results list.

Underpay answered 13/1, 2021 at 16:25 Comment(0)
A
0

It appears that the implementation in https://pypi.org/project/frechetdist/ is limited to scenarios where the 2 paths must have equal lengths.

I found this repo: https://github.com/joaofig/discrete-frechet where the author made some improvements over the dynamic programming approach.

Aggressor answered 28/4, 2023 at 9:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.