-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty Graph returned for circular skeletons without branches #11
Comments
sknw follow these steps:
so a pure ring without any branch would not be detected now. |
Thanks for the quick response! I am looking at the source right now and will see if I can patch it to my needs. I am thinking of adding one random start node if there are 0 nodes, but the skeleton image has non-zero entries. |
I think this might do for my purposes:
|
I learn np.unravel_index from you, thanks. |
i would give a update soon |
Oh yes - thanks for checking the code and finding the issues with it - I just needed it for a very simple example so I did miss the other possible cases. |
add isolate and ring parameter, have a try. |
I am not sure if this is on purpose, but it looks like there is no graph returned for skeletons that result in a single chain that connects back to itself - I tried both multi=False and True but the result is aways an empty graph:
img = loadImg(path)>127
ske = skeletonize(~img).astype(np.uint16)
graph = sknw.build_sknw(ske)
print("\n".join(nx.generate_gml(graph)))`
Result:
graph [ ]
The text was updated successfully, but these errors were encountered: