You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I happened to implement this algorithm and found my version much faster. Also, I could not get your version to do 200000 pts (which who knows if anyone needs that). Situations such as being on a server might benefit from a faster, less resource intense implementation. Here's my Visvalingam-Whyatt code
Here is a comparison between our two implementations I did in IPython.
import numpy as np
from visvalingam.visvalingam import VisvalingamSimplification
from polysimplify import VWSimplifier
n = 5000
thetas = np.linspace(0,2*np.pi,n)
thetas = np.linspace(0,2*np.pi,n)
pts = [[np.sin(x),np.cos(x)] for x in thetas]
def milkbread(pts):
simplifier = VisvalingamSimplification(pts)
simplifier.enrichLineString()
def permafacture(pts):
simplifier = VWSimplifier(pts)
%timeit milkbread(pts)
1 loops, best of 3: 21.7 s per loop
%timeit permafacture(pts)
10 loops, best of 3: 115 ms per loop
len(pts)
5000
The text was updated successfully, but these errors were encountered:
I happened to implement this algorithm and found my version much faster. Also, I could not get your version to do 200000 pts (which who knows if anyone needs that). Situations such as being on a server might benefit from a faster, less resource intense implementation. Here's my Visvalingam-Whyatt code
Here is a comparison between our two implementations I did in IPython.
The text was updated successfully, but these errors were encountered: