title: Webcam + Open CV Python | Black screen
body: <p>I am using the code below, but I get a black image. Could you please help me rectify the error?</p>
  
  <pre><code>import cv2
  import numpy as np
  c = cv2.VideoCapture(0)
  
  while(1):
      _,f = c.read()
      cv2.imshow('e2',f)
      if cv2.waitKey(5)==27:
          break
  cv2.destroyAllWindows()
  </code></pre>