Separate the connected lines and shapes

2 ビュー (過去 30 日間)
consortium
consortium 2014 年 1 月 21 日
コメント済み: consortium 2014 年 1 月 22 日
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 2014 年 1 月 21 日
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 2014 年 1 月 21 日
For the initial part of this discussion, see this http://www.mathworks.com/matlabcentral/answers/112850#comment_190861

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2014 年 1 月 21 日
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 件のコメント
Image Analyst
Image Analyst 2014 年 1 月 21 日
consortium
consortium 2014 年 1 月 22 日
I must try another way another method, now I want joins this discontinuous lines

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by