Remove the spurious edge of skeleton
Ältere Kommentare anzeigen
Recently, I've had an object to get it's skeleton,and then simplified the skeleton
but my problem is how to remove the edge of the skeleton for simplified the skeleton
here is my few steps:
First,I've got the skeleton from my object with bwmorph(ima,'skel',Inf)
here is the object which has been filled and the skeleton below:
filling the object:

the skeleton:

Second,for the skeleton, I've mark the branch points and end points
to mark the branch points and end points,I use bwmorph(skel, 'branchpoints') and
bwmorph(skel, 'endpoints');
here is the figure that I marked the points below:

the reds are branch points
the blues are end points
and the last step,
from the above figure, I want to remove the edges between branch point and end point (here I call the edge is spurious edge)
here is the resulting figure that I want

my problem is how can I remove the spurious edges
I've referenced this article
and the suggestions are set the threshold of the distance
but in my situation,the lengths of the spurious edges may have too long or too short...
Akzeptierte Antwort
Weitere Antworten (2)
Liana Norazmi
am 7 Mai 2015
1 Stimme
May i know how to remove the lines of this image

become like this?

1 Kommentar
Karthick Jayaraman
am 29 Aug. 2019
Is there any possibility yo do this in 3D logical array. I guess bwdistgeodesic doest work well in 3D. Any suggestions would be helful!?
Hong
am 30 Sep. 2013
0 Stimmen
Kategorien
Mehr zu Morphological Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
