2014-04-10 02:27:38 -0600 | received badge | ● Supporter (source) |
2014-04-10 02:27:10 -0600 | answered a question | highgui.VideoCapture buffer introducing lag Same problem here, didn't find any proper solution but some kind of a hack to do what I want : I found out that this buffer accumulates a constant number of images if you don't read them. In my case, the buffer always containes 5 images. So I did something (wrong) like that everytime I needed an image : "for(i=0; i<6; i++) { cam >> img; }" Reading from buffer don't take long and this doen't seem to bring any problem to the table as long as you don't read too ofter from your camera. As I said, if you constantly read from VideoCapture, your buffer is empty, and if you try to read 5 images from your camera as your buffer is empty, you'll have to wait your camera to capture the images. What I mean is : if you only need to read an image time to times, just use that hack, but if (like me) you sometimes need to do a real-time analysis, that may be a bit more complicated. |