title: Locating the end points of a bridge-like structure in an image
body: <p>How do I locate the end points of a bridge-like structure in an image?</p>
  
  <p><em>Below is a generalized representation.</em></p>
  
  <p><img src="https://i.stack.imgur.com/goVxE.png" alt="Enter image description here"></p>
  
  <p>I have a set of images that look like what you see on the left hand column as shown in the above picture. What I am trying to detect/locate is actually the two endpoints that are shown on the right hand column in the above picture. It's quite like locating the "two ends points" of the 'bridge'.</p>
  
  <p>I have applied some basic morphological operations; however, either I'm doing it wrong or those basic morphological operations aren't working in this scenario. (I have tried making it into skeletons; however, once the skeletons are formed, I can't seem to detect the cross with three edges).</p>
  
  <h2><strong><em>EDITS</em></strong></h2>
  
  <p>Thanks for the previous suggestion; however, it looks like the original sets of images cannot be completely generalized like what I'd previously drawn.  </p>
  
  <p>I have attached the latest updates to this question. Below is a more detailed representation that includes the original segmented regions and the corresponding images that'd undergone a "thinning" morphological operation. Again, the left side is the originally segmented region; while on the right would be the points to be detected. </p>
  
  <p><img src="https://i.stack.imgur.com/lLZIJ.png" alt="Enter image description here"></p>