I want to grab a single frame from my webcam with node.js and OpenCV. The first frame captured is as expected. But if I move in front of the camera and take a second one, I get an image that was obviously taken quite after the first one and doesnt show my move. I have to take 5 pictures to see the move. Searching on the net gave me hint about a problem with the camera buffer that holds 4 images (OS depended).
Here is an example of someone having the same issue: http://opencvarchive.blogspot.de/2010/05/opencv-arm-linux-servo-frame-delay.html
At the moment I'm doing a workaround and capture 5 images within a loop and then save the last image to disk. So the buffer is cleared and the really current image is taken.
Does anyone knows a better solution? Taking five images instead of one takes too much time for my application...
Thanks in advance! :)