Open qiang-zhang-neu opened 4 years ago
@qiang-zhang-neu right now, we don't have any tools for that in skan. I suspect that adding them would require something like object.simplify
from Shapely. You can find the docs here:
https://shapely.readthedocs.io/en/stable/manual.html#object.simplify
Including the reference for the algorithm, reproduced below for convenience. Shapely is 2D-only, though. I would definitely welcome a contribution to skan implementing this algorithm in nD, but I myself don't have time to work on this at the moment...
David H. Douglas and Thomas K. Peucker, “Algorithms for the Reduction of the Number of Points Required to Represent a Digitized Line or its Caricature,” Cartographica: The International Journal for Geographic Information and Geovisualization, vol. 10, Dec. 1973, pp. 112-122.
skan is a very good project. However, I wonder whether there is a method to make the path smooth? I need to calculate the resliced image along the skeleton, and the path (skel.path_coordinates) is not smooth. How can I make the path more smooth? Thank you very much!