title: How to increase performance of OpenCV cv2.VideoCapture(0).read()
body: <p>I'm running this script on Kali linux with intel core i7-4510u:</p>
  
  <pre><code>import cv2
  from datetime import datetime
  vid_cam = cv2.VideoCapture(0)
  vid_cam.set(cv2.CAP_PROP_FPS, 25)
  vid_cam.set(cv2.CAP_PROP_FRAME_WIDTH, 640)
  vid_cam.set(cv2.CAP_PROP_FRAME_HEIGHT, 360)
  
  lastDate = datetime.now().second
  fcount = 0
  while(vid_cam.isOpened()):
      if(datetime.now().second&gt;lastDate):
          lastDate = datetime.now().second
          print("Fps: " + str(fcount))
          fcount = 0
      else:
          fcount += 1
      ret, image_frame = vid_cam.read()
      cv2.imshow('frame', image_frame)
      if cv2.waitKey(100) &amp; 0xFF == ord('q'):
          break
  vid_cam.release()
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>If I run it, it prints <strong>Fps: 4</strong>.
  <br>If I check Task Manager <strong>my cpu is at about 2%</strong>.
  <br>Where can the problem be?</p>