Missing small edges
drStacky opened this issue · 4 comments
Small edges in the skeleton (2px) are being omitted from the graph. I understand that you have a way to mark pixels with 0, 1, 2 to determine nodes in the graph so that you're not just connecting every pixel to its neighbor (or you'd get loops/triangles at intersections in the skeleton), but I think as a result of that, the short segments are getting lost.
Here's an example where the skeleton is in white, and the edges are red.
not missing, just did not draw.
for I just draw the path, (did not contain the node point)
so the one pixel path could not be drawn by plt.plot
I will add the node point in the path later.
It wasn't just an issue with how it was being displayed. The edges were not showing up in my graph. It looks like you changed something in the trace
function that fixed it, though, so thank you.
Here are results from an application I'm working on with sknw pre-commit (red) and post-commit (green). There is some smoothing of edges, which is why they don't line up perfectly. Nothing else was changed.
P.S. Thank you for writing this library and responding quickly to this issue. It has been very helpful.