title: opencv - plot contours in an image
body: <p>I am trying to draw contour around an image. I can see that contours being found but I am not able to draw the outline. The color of the contour seem to be either of the two (black and white) colors. </p>
  
  <pre><code>import cv2
  import numpy as np
  import matplotlib.pyplot as plt
  from skimage import io
  %matplotlib inline
  im = io.imread('http://matlabtricks.com/images/post-35/man.png')
  plt.imshow(im)
  imgray = cv2.cvtColor(im,cv2.COLOR_BGR2GRAY)
  plt.figure()
  plt.imshow(imgray)
  
  #Contoured image
  ret,thresh = cv2.threshold(imgray, 120,255,cv2.THRESH_BINARY)
  image, contours, hierarchy = cv2.findContours(thresh,cv2.RETR_TREE,cv2.CHAIN_APPROX_SIMPLE)
  c_img = cv2.drawContours(image, contours, -1, (0, 255, 0), 1)
  plt.figure()
  plt.imshow(c_img)
  </code></pre>