title: "Cut out" an image based on edge detection
body: <p>This is my original image: <img src="https://i.stack.imgur.com/r8ATB.jpg" alt="Weld Nut"></p>
  
  <p>I've asked the user to crop it, converted it to grayscale and ran this line of code on it:</p>
  
  <pre><code>edgeImg = edge(grayImg,'canny',0.23);
  </code></pre>
  
  <p>This is the result:</p>
  
  <p><img src="https://i.stack.imgur.com/aeUmH.png" alt="Edges"></p>
  
  <p>I want to "cut out" everything the middle circle and the outside edge, essentially. I'm having a really hard time figuring out how to do this and honestly I'm at a loss.</p>
  
  <p>I considered trying to fill in the area that I want to keep in the binary image, and then I could use it as a stamp, but I couldn't come up with a way that didn't fill in the middle circle as well.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: This white area is what I want to keep:</p>
  
  <p><img src="https://i.stack.imgur.com/VSvxy.png" alt="Highlighted"></p>