Branching points detection in processed image
Use MorphologicalBranchPoints
.
im = Binarize@Import["https://i.stack.imgur.com/O0AMj.png"]
skel = Pruning[Thinning[im], 20];
HighlightImage[skel, MorphologicalBranchPoints[skel]]
Another possibility is to use
skel1 = Pruning[Thinning[im, Method -> "MedialAxis"], 10];
as a start then smoothen the result using
skel2 = Thinning@Dilation[skel1, 5]
so that MorphologicalBranchPoints
would not give false results.
HighlightImage[skel2, MorphologicalBranchPoints[skel2]]
I notice there's a faint pink background that seems like a natural boundary. I've highlighted it to showcase this:
We can extract this curve and use it as the original boundary:
im = Import["https://i.stack.imgur.com/7Ck2S.png"];
mask = FillingTransform[Thinning[Binarize[ColorReplace[im, White -> Black, .055], 0]], CornerNeighbors -> True]
And the simply call MorphologicalBranchPoints
:
skel = Thinning[mask];
HighlightImage[skel, MorphologicalBranchPoints[skel], 1]