MATLAB Answers

Separate the connected lines and shapes

9 views (last 30 days)
consortium on 21 Jan 2014
Commented: consortium on 22 Jan 2014
I want an approach and method to separate the connected lines. Here is my image
and here is the result I would like
How do I solve that problem? Thank you in advance!


Doug Hull
Doug Hull on 21 Jan 2014
Will the place you break always be on a "vertical" segment?
I think Regionprops and some heuristics will allow you to do this reasonably. Any a priori knowledge is useful to allow you to make this algorithm.

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 21 Jan 2014
call bwmorph to get branchpoints. Then remove then. Then get the endpoints of the segments and compute the angle. Remove any segments that are more vertical than horizontal. Then replace the branchpoints.


consortium on 21 Jan 2014
This comment was flagged by Madsen John
Thanks, I already tried it but I can detect all connected lines here is results obtained
consortium on 22 Jan 2014
I must try another way another method, now I want joins this discontinuous lines

Sign in to comment.

Sign in to answer this question.

Translated by