title: How to fill contour of connected edge and crop the image out in python?
body: <p><a href="https://i.stack.imgur.com/Vrs2l.jpg" rel="nofollow noreferrer">click to view the image</a></p>
  
  <p>the left side is the original image and I've used canny edge detection method to only get the outer edge of the image as you can see from the right side image. Now is it possible to fill the connected edge with white color and crop the image? Sorry i'm quite new in image processing</p>