How to transform a broken line into a simple line with the same length?
Afficher commentaires plus anciens
Just as the question title shows, I want to convert a broken line into a line with same length.The example image is here.

The image is skel of a object and is obtained by using the function bwmorph(, 'skel', Inf).The red star points in the image are the branch points. The yellow points denote the endpoints of the branches.
What should I do to turn the spine which has the red star points into line with same length and keep the relative position of the yellow points?
Any suggestion or clue?
Réponses (1)
Image Analyst
le 14 Sep 2013
0 votes
Have you tried the "spur" option in bwmorph()?
5 commentaires
Donghui Sun
le 15 Sep 2013
Image Analyst
le 15 Sep 2013
How are you defining spur and branch?
Alternate method is to look for crossing points and endpoints and keep line segments with two end points.
Donghui Sun
le 15 Sep 2013
Image Analyst
le 15 Sep 2013
Upload a photo without annotation if you need me to show you.
Donghui Sun
le 16 Sep 2013
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!