All Projects → spiros → discrete_frechet

spiros / discrete_frechet

Licence: Apache-2.0 license
Compute the Fréchet distance between two polygonal curves in Euclidean space.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to discrete frechet

smooth-corners
CSS superellipse masks using the Houdini API
Stars: ✭ 133 (+95.59%)
Mutual labels:  curve, smoothing
Interactive Data Editor
A Software to interactively edit data in a graphical manner
Stars: ✭ 35 (-48.53%)
Mutual labels:  smoothing
Joeecc
Elliptic Curve Cryptography playground/toolkit written in pure Python
Stars: ✭ 46 (-32.35%)
Mutual labels:  curve
Threejs Path Flow
🐬🐟 ↶Mesh Deformation / Bending / Following on a Curve
Stars: ✭ 165 (+142.65%)
Mutual labels:  curve
Noble Bls12 381
Fastest implementation of BLS12-381 in a scripting language. High-security, auditable, 0-dependency aggregated signatures / zk-snarks over pairing-friendly curve
Stars: ✭ 73 (+7.35%)
Mutual labels:  curve
Mojs Curve Editor
GUI for live easing/property curves editing
Stars: ✭ 196 (+188.24%)
Mutual labels:  curve
Moto.js
A light motion library with curvilinear support.
Stars: ✭ 24 (-64.71%)
Mutual labels:  curve
Tinynurbs
C++ library for NURBS curves and surfaces
Stars: ✭ 129 (+89.71%)
Mutual labels:  curve
Elm Geometry
2D/3D geometry package for Elm
Stars: ✭ 162 (+138.24%)
Mutual labels:  curve
gee whittaker
Non-parametric weighted Whittaker smoothing
Stars: ✭ 30 (-55.88%)
Mutual labels:  smoothing
Curvejs
Made curve a dancer in HTML5 canvas - 魔幻线条
Stars: ✭ 1,251 (+1739.71%)
Mutual labels:  curve
Crescento
Add curve at bottom of image views and relative layouts.
Stars: ✭ 1,289 (+1795.59%)
Mutual labels:  curve
Yieldfarming
🧑‍🌾 It ain't much, but it's an honest work
Stars: ✭ 235 (+245.59%)
Mutual labels:  curve
Curve Fit
Curve-Fit is an Android library for drawing curves on Google Maps
Stars: ✭ 63 (-7.35%)
Mutual labels:  curve
btc-bash-ng
math and bitcoin tools in gnu bc and bash
Stars: ✭ 25 (-63.24%)
Mutual labels:  curve
Beziercurve
Bezier curve master
Stars: ✭ 43 (-36.76%)
Mutual labels:  curve
Naughtybeziercurves
Bezier Curve Game Object for Unity
Stars: ✭ 195 (+186.76%)
Mutual labels:  curve
libgoldilocks
An implementation of Mike Hamburg's Ed448 (Goldilocks) curve - derived from libdecaf. This is a mirror of https://bugs.otr.im/otrv4/libgoldilocks
Stars: ✭ 17 (-75%)
Mutual labels:  curve
frechet
Discrete Fréchet distance and of the minimum path required for traversing with it
Stars: ✭ 14 (-79.41%)
Mutual labels:  curve
Flubber
Flubber is an elegant solution for making animations in Android. The library is developed and maintained by Appolica.
Stars: ✭ 254 (+273.53%)
Mutual labels:  curve

Build Status

DOI

Discrete Fréchet distance

Computes the discrete Fréchet distance between two curves. The Fréchet distance between two curves in a metric space is a measure of the similarity between the curves. The discrete Fréchet distance may be used for approximately computing the Fréchet distance between two arbitrary curves, as an alternative to using the exact Fréchet distance between a polygonal approximation of the curves or an approximation of this value.

This is a Python 3.* implementation of the algorithm produced in Eiter, T. and Mannila, H., 1994. Computing discrete Fréchet distance. Tech. Report CD-TR 94/64, Information Systems Department, Technical University of Vienna.

Function dF(P, Q): real;
    input: polygonal curves P = (u1, . . . , up) and Q = (v1, . . . , vq).
    return: δdF (P, Q)
    ca : array [1..p, 1..q] of real;
    function c(i, j): real;
        begin
            if ca(i, j) > −1 then return ca(i, j)
            elsif i = 1 and j = 1 then ca(i, j) := d(u1, v1)
            elsif i > 1 and j = 1 then ca(i, j) := max{ c(i − 1, 1), d(ui, v1) }
            elsif i = 1 and j > 1 then ca(i, j) := max{ c(1, j − 1), d(u1, vj ) }
            elsif i > 1 and j > 1 then ca(i, j) :=
            max{ min(c(i − 1, j), c(i − 1, j − 1), c(i, j − 1)), d(ui, vj ) }
            else ca(i, j) = ∞
            return ca(i, j);
        end; /* function c */

    begin
        for i = 1 to p do for j = 1 to q do ca(i, j) := −1.0;
        return c(p, q);
    end.

Parameters

P : Input curve - two dimensional array of points
Q : Input curve - two dimensional array of points

Returns

dist: float64
The discrete Frechet distance between curves `P` and `Q`.

Examples

>>> from frechetdist import frdist
>>> P=[[1,1], [2,1], [2,2]]
>>> Q=[[2,2], [0,1], [2,4]]
>>> frdist(P,Q)
>>> 2.0
>>> P=[[1,1], [2,1], [2,2]]
>>> Q=[[1,1], [2,1], [2,2]]
>>> frdist(P,Q)
>>> 0
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].