title: open cv error: (-215) scn == 3 || scn == 4 in function cvtColor
body: <p>I'm currently in Ubuntu 14.04, using python 2.7 and cv2. </p>
  
  <p>When I run this code: </p>
  
  <pre><code>import numpy as np
  import cv2
  
  img = cv2.imread('2015-05-27-191152.jpg',0)
  gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  </code></pre>
  
  <p>it returns:</p>
  
  <pre><code> File "face_detection.py", line 11, in &lt;module&gt;
      gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
  cv2.error: /home/arthurckl/Desktop/opencv-3.0.0-rc1/modules/imgproc/src/color.cpp:7564: error: (-215) scn == 3 || scn == 4 in function cvtColor
  </code></pre>
  
  <p>I already searched here and one answer said that I could be loading my photo the wrong way, because it should have 3 dimensions: rows, columns and depth.</p>
  
  <p>When I print the img.shape it returns only two numbers, so I must be doing it wrong. But I don't know the right way to load my photo.</p>