title: Separate two overlapping circles in an image using MATLAB
body: <p>How do I separate the two connected circles in the image below, using MATLAB? I have tried using <code>imerode</code>, but this does not give good results. Eroding does not work, because in order to erode enough to separate the circles, the lines disappear or become mangled. In other starting pictures, a circle and a line overlap, so isolating the overlapping objects won't work either.</p>
  
  <p>The image shows objects identified by <code>bwboundaries</code>, each object painted a different color. As you can see, the two light blue circles are joined, and I want to disjoin them, producing two separate circles. Thanks</p>
  
  <p><a href="https://i.stack.imgur.com/oDtXN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oDtXN.jpg" alt=""></a>
  </p>