Distances.jl icon indicating copy to clipboard operation
Distances.jl copied to clipboard

Fréchet distance

Open Kolaru opened this issue 6 years ago • 6 comments

I have an (yet untested) implementation of discrete Fréchet distance between curves that I would be happy to share. Is this package a good fit for such kind of distances ? I'm wondering as for what I see all distances defined up to now are distances between vectors.

If it's deemed a good fit, I'll propose a PR.

Kolaru avatar Jan 13 '20 20:01 Kolaru

I'm not familiar with the Fréchet distance, but if you can make it fit in the existing framework, then sure.

I'm wondering as for what I see all distances defined up to now are distances between vectors.

What do you mean? What kind of object would your function take?

nalimilan avatar Jan 15 '20 10:01 nalimilan

Discrete Fréchet distance is a distance between polygonal curves, so the input would be lists of points (or rather matrices where each column corresponds to a point). So it wouldn't add any dependency but may make internal broadcasting rules for pairwise and colwise significantly more complex (if kept as generic as possible).

Kolaru avatar Jan 15 '20 11:01 Kolaru

Mmm, that sounds like a much more ambitious change then. Maybe develop this in another package first. Are there other similar distances that would use the same framework?

nalimilan avatar Jan 15 '20 16:01 nalimilan

After doing some reasearch it looks like there is not many other metrics between polygonal curves/object represented by matrices. So there isn't much need for a generic interface as far as I can see.

I'll go for a separate package first as you suggest I think.

Kolaru avatar Jan 15 '20 23:01 Kolaru

Hi @Kolaru did you end up create that package for Fréchet distance? Keen to see your implementation as I'm looking for something I can use in my application to compare lines

captchanjack avatar Sep 13 '21 12:09 captchanjack

@captchanjack You can find my implementation there https://github.com/Kolaru/FrechetDistance.jl.

I did not end up using it very much, so I haven't spend much time optimizing or testing it, though.

Kolaru avatar Sep 13 '21 13:09 Kolaru