title: Connecting the dots in an image
body: <p>I have the following image:</p>
  
  <p><img src="https://i.stack.imgur.com/SWal5.png" alt="enter image description here"></p>
  
  <p>Is there a way to connect the dots (draw a line between them) using <code>MATLAB</code>? I tried <code>plot</code> by passing it the image, but didn't work.</p>
  
  <p>Thanks.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>The way I'm expecting to connect the dots is roughly as shown through the red line in the image sample below:</p>
  
  <p><img src="https://i.stack.imgur.com/pXj8e.png" alt="enter image description here"></p>