title: OpenCv webcam reading official code is very slow
body: <p>I just got a highend 1080p webcam, opening it in the "camera" app of windows 10 display it flawlessly, at 25 or 30fps, however when using opencv it's very laggy, I put a timer in the loop while disabling the display and I have around 200ms between each frame.</p>
  
  <p>Why?</p>
  
  <pre><code>import numpy as np
  import cv2
  import time
  
  def getAvailableCameraIds(max_to_test):
      available_ids = []
      for i in range(max_to_test):
          temp_camera = cv2.VideoCapture(i)
          if temp_camera.isOpened():
              temp_camera.release()
              print "found camera with id {}".format(i)
              available_ids.append(i)
      return available_ids
  
  def displayCameraFeed(cameraId, width, height):
      cap = cv2.VideoCapture(cameraId)
      cap.set(cv2.CAP_PROP_FRAME_WIDTH, width)
      cap.set(cv2.CAP_PROP_FRAME_HEIGHT, height)
  
      while(True):
          start = time.time()
          ret, frame = cap.read()
          rgb = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
          end = time.time()
          print "time to read a frame : {} seconds".format(end-start)
  
          #DISABLED
          #cv2.imshow('frame', frame)
          #if cv2.waitKey(1) &amp; 0xFF == ord('q'):
              #break
  
      cap.release()
      cv2.destroyAllWindows()
  
  #print getAvailableCameraIds(100)
  displayCameraFeed(0, 1920, 1080)
  </code></pre>
  
  <p>Thanks</p>
  
  <p>Opencv 3.1 on a windows 10 x64, with python 2.7 x64 </p>