mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-27 18:25:32 +08:00
Fix polygon approximation for 0 or less tolerance
This commit is contained in:
@@ -28,7 +28,7 @@ def approximate_polygon(coords, tolerance):
|
||||
----------
|
||||
.. [1] http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
|
||||
"""
|
||||
if tolerance == 0:
|
||||
if tolerance <= 0:
|
||||
return coords
|
||||
|
||||
chain = np.zeros(coords.shape[0], 'bool')
|
||||
|
||||
Reference in New Issue
Block a user