mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-18 12:40:14 +08:00
Fix polygon approximation for 0 or less tolerance
This commit is contained in:
committed by
Stefan van der Walt
parent
e428285aa5
commit
96799d4795
@@ -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