title: OpenCV Contours - need more than 2 values to unpack
body: <p>I am trying to implement contours using the following code..</p>
  
  <pre><code>im = cv2.imread('C:\Users\Prashant\Desktop\T.jpg')
  imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
  ret,thresh = cv2.threshold(imgray,127,255,0)
  image, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
  img = cv2.drawContour(im, contours, -1, (0,255,0), 3)
  cv2.imshow('Image1',img)
  </code></pre>
  
  <p>but i am continously getting the following error.</p>
  
  <pre><code>Traceback (most recent call last):
   File "&lt;stdin&gt;", line 1, in &lt;module&gt;
   File "C:\Python27\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 540, in runfile
      execfile(filename, namespace)
    File "C:/Users/Prashant/.spyder2/.temp.py", line 17, in &lt;module&gt;
      image, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
  ValueError: need more than 2 values to unpack
  </code></pre>
  
  <p>do the function findContours need more arguments?
  wht could i do to correct it.</p>