title: exceptions.TypeError: src is not a numpy array, neither a scalar
body: <pre><code>import cv2
  import numpy as np
  
  def imageMoments(img):
      #Single channel(8 bit or floating point 2D array)  
      read_original = cv2.imread(img)
  
      ret,thresh = cv2.threshold(img, 127, 255, 0)
      contours, hierarchy = cv2.findContours(thresh, cv2.RETR_LIST, cv2.CHAIN_APPROX_NONE)
      cnt = contours[0]
  
      M = cv2.moments(cnt)
      print M
  
      cx = int(M[’m10’]/M[’m00’])
      cy = int(M[’m01’]/M[’m00’])
      return
  </code></pre>
  
  <p>I get the error</p>
  
  <pre><code>src is not a numpy array, neither a scalar
  </code></pre>