Separate the connected lines and shapes

1 次查看(过去 30 天)
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.

请先登录,再进行评论。

回答(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.

Community Treasure Hunt

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

Start Hunting!

Translated by