title: Can't read frames from camera OpenCV
body: <p>Im trying to get the frames from my camera with following basic code : </p>
  
  <pre><code>import cv2
  import numpy as np
  
  cap = cv2.VideoCapture(0)
  
  
  while True : 
      ret,frame = cap.read()
      print(frame)
      cv2.imshow('frame',frame)
  
      if cv2.waitKey(1) &amp; 0xFF == ord('q'):
          break
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>But I'm getting this error :   </p>
  
  <pre><code>None
  OpenCV(3.4.1) Error: Assertion failed (size.width&gt;0 &amp;&amp; size.height&gt;0) in imshow, file /tmp/opencv-20180307-44253-2moj1c/opencv-3.4.1/modules/highgui/src/window.cpp, line 356
  Traceback (most recent call last):
    File "video_cap_opencv.py", line 11, in &lt;module&gt;
      cv2.imshow('frame',frame)
  cv2.error: OpenCV(3.4.1) /tmp/opencv-20180307-44253-2moj1c/opencv-3.4.1/modules/highgui/src/window.cpp:356: error: (-215) size.width&gt;0 &amp;&amp; size.height&gt;0 in function imshow
  </code></pre>
  
  <p>Knowing the same code worked well for me before, What could be causing this ?</p>