I've referred people to the junction-handling in skan from the paper's supplementary material more times than I can remember:
https://peerj.com/articles/4312/#supp-1
It's a rather confusing part of the code, and though it is useful, it would be good to have alternatives that preserve each and every pixel in the original skeleton.
One idea: of all the pixels in a junction, only assign one to be a junction (how to do that is left as an exercise for the reader). The others get assigned to the incoming paths, and all links to non-junction pixels are removed (ie the degrees are artificially reduced).
I've referred people to the junction-handling in skan from the paper's supplementary material more times than I can remember:
https://peerj.com/articles/4312/#supp-1
It's a rather confusing part of the code, and though it is useful, it would be good to have alternatives that preserve each and every pixel in the original skeleton.
One idea: of all the pixels in a junction, only assign one to be a junction (how to do that is left as an exercise for the reader). The others get assigned to the incoming paths, and all links to non-junction pixels are removed (ie the degrees are artificially reduced).