I am using OpenCV2 to take some timelapse photos with a webcam. I want to extract the most recent view seen by the webcam. I try to accomplish this like so.
impo
I have read that in the VideoCapture object there is a 5 frame buffer, and there is the .grab method that takes the frame but does not decode it.
.grab
So you can
cap = cv2.VideoCapture(0) for i in xrange(4): cap.grab() ret, frame = cap.read() ...