title: How do I display the contours of an image using OpenCV Python?
body: <p>I followed this tutorial from official <a href="https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_imgproc/py_contours/py_contours_begin/py_contours_begin.html" rel="noreferrer">documentation</a>. I run their code:</p>
  
  <pre><code>import numpy as np
  import cv2
  
  im = cv2.imread('test.jpg')
  imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
  ret,thresh = cv2.threshold(imgray,127,255,0)
  contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
  cv2.drawContours(img, contours, -1, (0,255,0), 3)
  </code></pre>
  
  <p>That is ok: no errors, but nothing is displayed.I want to display the result they got as they showed it on the picture:</p>
  
  <p><img src="https://i.stack.imgur.com/jLLyQ.jpg" alt="enter image description here"></p>
  
  <p>How can I display the result of the countours like that (just the left result or the right one) ?
  I know I must use <code>cv2.imshow(something)</code> but how in this specific case ?</p>