title: <unknown> is not a numpy array error
body: <p>I am trying to apply threshold to an image, but I get the following error :</p>
  
  <blockquote>
    <p>TypeError: 'unknown' is not a numpy array</p>
  </blockquote>
  
  <p>I get this error on the cv2.imshow() line.</p>
  
  <p>Here is my code :</p>
  
  <pre><code>import cv2
  import numpy as np
  img = cv2.imread('...',0)
  img2 = cv2.imread('...',0)
  fImg = cv2.addWeighted(img.astype(np.float32), 0.9, img2.astype(np.float32), 0.1, -20.0)
  th = cv2.threshold(fImg, 127, 255, cv2.TRESH_BINARY)
  cv2.imshow('th', th)
  cv2.waitKey(0)
  cv2.destroyAllWindows
  </code></pre>
  
  <p>Thanks in advance for your help !</p>