title: Contour detection person holding paper sheet
body: <p>I need to detect white paper held by a person. Problem here is fingers, which breaks contour lines. Some contours contain some sort of, I call it noise, in the shape.</p>
  
  <p>Contours with fingers:<br>
  <a href="https://i.stack.imgur.com/HUb9X.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HUb9X.png" alt="Contours with fingers"></a></p>
  
  <p>Original img:<br>
  <a href="https://i.stack.imgur.com/u5Oa4.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u5Oa4.jpg" alt="Original img"></a></p>
  
  <pre><code>import cv2
  import imutils
  import numpy as np
  
  image = cv2.imread('test.jpg')
  ratio = image.shape[0] / 500.0
  orig = image.copy()
  image = imutils.resize(image, height = 500)
  
  orig = image.copy()
  
  gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  gray = cv2.GaussianBlur(gray, (5,5), 0)
  edged = cv2.Canny(gray, 100, 200)
  
  image, cnts, hierarchy = cv2.findContours(edged.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)
  cnts = sorted(cnts, key = cv2.contourArea, reverse = True)[:10]
  
  for c in cnts:
      # approximate the contour
  
      peri = cv2.arcLength(c, True)
      approx = cv2.approxPolyDP(c, 0.1 * peri, True)
  
      #epsilon = 0.1*cv2.arcLength(c,True)
      #approx = cv2.approxPolyDP(c,epsilon,True)
      #approx = cv2.approxPolyDP(c,0.1*cv2.arcLength(c,True),True)
  
      if len(approx) == 4:
          screenCnt = approx
          break
  
  
  cv2.drawContours(orig, [screenCnt], -1, (0, 255, 0), 2)
  cv2.imshow("Found", image)
  
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>
  
  
  
  <p>And second question</p>
  
  <p>How to insert image into contour</p>