Ask Your Question

Revision history [back]

Ok, so LBerger gave me a great lead when pointing out time exposure is at a low framerate. It seems the camera is simply lowering its' fps when exposure (gain?) is high. There doesn't seem to be a way to get the actual framerate of the cam (CV_CAP_PROP_FPS only returns the user set fps).

A hack is to lower the cam processing to 10fps instead of thirty. So when the webcam lowers its fps, you aren't stuck waiting for videocapture::read. A real solution would be a callback hookup into videocapture called when data is ready (like pretty much every audio API out there).

Since openCV doesn't seem to have that, another solution is to run the capture on a low priority thread, that can stall at read without affecting the rest of the app.

Hope this helps someone.