title: python 2.7 and opencv code gives cvtcolor error
body: <pre><code>faceCascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
  
  video_capture = cv2.VideoCapture(0) 
  
  while True:
  
  
  ret, frame = video_capture.read()
  
  gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  
  faces = faceCascade.detectMultiScale(
      frame,
      scaleFactor=1.1,
      minNeighbors=5,
      minSize=(30, 30),
      flags=cv2.cv.CV_HAAR_SCALE_IMAGE
  )
  
  # Draw a rectangle around the faces
  for (x, y, w, h) in faces:
      cv2.rectangle(frame, (x, y), (x+w, y+h), (0, 255, 0), 2)
  
  # Display the resulting frame
  cv2.imshow('Video', frame)
  
  if cv2.waitKey(1)==ord('e'):
      break
  </code></pre>
  
  <p>code gives this error, please help me</p>
  
  <blockquote>
    <p>Traceback (most recent call last):   File
    "C:\Users\yavuz\Desktop\sor\sor2.pyw", line 15, in 
        gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) error: ........\opencv\modules\imgproc\src\color.cpp:3737: error: (-215)
    scn == 3 || scn == 4 in function cv::cvtColor</p>
  </blockquote>