title: AttributeError: 'NoneType' object has no attribute 'ravel'
body: <p>Can someone please tell me what is wrong with this code? I keep on getting a <code>NoneType</code> error. I am trying to create a histogram. </p>
  
  <pre><code>import cv2
  import numpy as np
  from matplotlib import pyplot as plt
  
  img = cv2.imread('C:\Pictures\naturalScene.bmp',0)
  plt.hist(img.ravel(),256,[0,256]);
  plt.show()
  </code></pre>