title: Invalid number of channels in input image error?
body: <p>I am trying to pass a numpy 2d array that represents an image into the cvtColor function. The image is grayscale. Here is some of the code:</p>
  <pre><code>  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  </code></pre>
  <p>Img is just a 2d numpy grayscale array. However, when I try to run this, I get this error:</p>
  <blockquote>
  <p>Invalid number of channels in input image:
  'VScn::contains(scn)'
  where
  'scn' is 1</p>
  </blockquote>
  <p>I have no idea what this means. Could someone clarify what is going on here and help me fix it? Thanks so much.</p>