title: get mask from contour with OpenCV
body: <p>I would like to get an image mask from the contour (it exists only 1 contour) I have computed thanks to cv.findContours. </p>
  
  <p>However, while my contour variable is not empty, I do not manage to retrieve an image mask using cv.drawContours, my destination image being always empty.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>img = mosaicImage[:,:,0].astype('uint8')
  contours, _ = cv.findContours(img.copy(), cv.RETR_TREE, cv.CHAIN_APPROX_SIMPLE)
  mask = np.zeros(img.shape, np.uint8)
  cv.drawContours(mask, contours, -1, (0,255,0),1)
  </code></pre>
  
  <p>I hope you could help!</p>
  
  <p>Thanks</p>