MATLAB Answers

Separate the connected lines and shapes

조회 수: 14(최근 30일)
consortium
consortium 21 Jan 2014
댓글: consortium 22 Jan 2014
Hi,
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!
Sincerely

  댓글 수: 2

Doug Hull
Doug Hull 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.
Image Analyst
Image Analyst 21 Jan 2014
For the initial part of this discussion, see this http://www.mathworks.com/matlabcentral/answers/112850#comment_190861

로그인 to comment.

답변(1개)

Image Analyst
Image Analyst 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.

  댓글 수: 3

consortium
consortium 21 Jan 2014
이 댓글에 1명의 참여자가 플래그를 지정함
Thanks, I already tried it but I can detect all connected lines here is results obtained
consortium
consortium 22 Jan 2014
I must try another way another method, now I want joins this discontinuous lines

로그인 to comment.

이 질문에 답변하려면 로그인을(를) 수행하십시오.


Translated by