title: OpenCV grab does nothing on webcam
body: <p>I've been trying to simultaneously grab frames from two different cameras, but no matter how many times I call VideoCapture::grab(), there seems to be no effect. The frame retrieved using VideoCapture::retrieve() is always the first frame captured from the last VideoCapture::retrieve().</p>
  
  <p>I've tested it on both OpenCV 2.4 and 3.1, with a Logitech C920 camera on windows.</p>
  
  <p>Example:</p>
  
  <pre><code>VideoCapture vCapture;
  Mat imgResult;
  vCapture.open(0); //at this point, there is a green sheet in front of the camera
  Sleep(100000); //change green sheet with red sheet
  vCapture.grab(); //returns true
  vCapture.retrieve(imgResult); //image with green sheet is retrieved
  Sleep(100000); //change red sheet with blue sheet
  vCapture.retrieve(imgResult); //red sheet is retrieved
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>for(int i = 0; i &lt; 1000; i++){
      vCapture.grab();
  } //takes almost no processing time, like an empty for
  vCapture.retrieve(imgResult); //same as before
  </code></pre>
  
  <p>Retrieve always returns true and retrieves a frame, even if no grab was called since opening vCapture.</p>
  
  <p>My current solution has been retrieving the frame twice (multi-threaded) to ensure the latest frame, but it isn't reliable enough to sync both cameras. Can anyone shed some light on how to force the camera to grab the current frame?</p>
  
  <p>Thanks!</p>
  
  <p>Edit:</p>
  
  <p>A variation of the first example, for clarity:</p>
  
  <pre><code>VideoCapture vCapture;
  Mat imgResult;
  vCapture.open(0); //at this point, there is a green sheet in front of the camera
  vCapture.retrieve(imgResult); //image with green sheet is retrieved
  Sleep(100000); //change green sheet with red sheet
  vCapture.grab(); //returns true
  vCapture.retrieve(imgResult); //green sheet is retrieved
  vCapture.retrieve(imgResult); //red sheet is retrieved
  Sleep(100000); //change red sheet with blue sheet
  vCapture.retrieve(imgResult); //red sheet is retrieved
  vCapture.retrieve(imgResult); //blue sheet is retrieved
  </code></pre>
  
  <p>Expected behavior:</p>
  
  <pre><code>VideoCapture vCapture;
  Mat imgResult;
  vCapture.open(0); //at this point, there is a green sheet in front of the camera
  vCapture.retrieve(imgResult); //error or image with green sheet is retrieved
  Sleep(100000); //change green sheet with red sheet
  vCapture.grab(); //returns true
  vCapture.retrieve(imgResult); //red sheet is retrieved
  </code></pre>
  
  <p>Per OpenCV documentation:</p>
  
  <p><code>VideoCapture::grab</code>: The methods/functions grab the next frame from video file or camera and return true (non-zero) in the case of success.</p>
  
  <p><code>VideoCapture::retrieve</code>: The methods/functions decode and return the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return false and the functions return NULL pointer.</p>