[cpia] Single frame captures and autoexposure

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Mon, 07 Feb 2000 09:22:03 +0100 (CET)


On 05-Feb-2000 Nick Holloway wrote:
> One problem with running vidcat at intervals to grab a single shot at
> intervals is that auto-exposure doesn't get a chance to work (even when
> run every minute).
> 
> Currently, before running vidcat, I'm running a perl script which
> blindly reads 30 frames to get the autoexposure to settle down first.
> This works, but isn't very pretty.
> 
> How does the Windows driver cope with this, or other v4l devices?  Is it
> the responsibility of the calling application (such as vidcat) to keep
> requesting frames and looking at the brightness until it settles down,
> or should the kernel be responsible for this?

I think the kernel is the wrong point for such a correction. There are now
all means available for an application to have full control over the
camera. The cpia-driver is AFAIK the first webcam-driver that implements
this. I played around with other initial settings for some time. But I am
convinced now that there is no setting suitable for all means. That was
one of the reasons for me to write the cpia-control.

There is one thing that might affect this settle-down problem. As soon as
you use some kind of asynchronous streaming fetch in the kernel, i.e. the
kernel is getting frames not only on demand but all the time, it would
seem that your problem is solved. However, there is no clear API in v4l at
what point to start/stop the streaming. If you do so on device-open/close
this would not solve anything since most web-cam software open/closes the
device all the time.

As Scott pointed out there is no need for you to actually use AEC. Just
switch to manual exposure control. BTW, during my tests it needed not
more than about 5 frames for the AEC to settle down.

-Peter


-------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
WWW:   http://www.risc.uni-linz.ac.at/people/ppregler