RogerInHawaii 0 Newbie Poster

I've written a C# program to capture images from a webcam (connected to the laptop via a USB port). I also have some special hardware (Arduino Uno, relay, flash unit) that lets my program trigger a photographic flash unit. My problem is in trying to synchronize the flash so that the image I subsequently capture is indeed of the "flashed" picture.

My expectation is that the camera spends a short period of time in "exposure mode", exposing the CCD elements to the incoming image and charging up those CCD elements. Then it goes into "transfer mode" in which the data from the CCD elements are transfered to memory. Then it zeros out the CCD elements. And finally it enters the next exposure mode.

I'm presently using the avicap32.dll as the interface to the camera, and it only provides a very limited set of functions for accessing the camera, such as an asynch image capture function. In particular it appears to have no way for my program to know what it's "doing" at any particular moment in time.

And what I'd really like is to be able to specify some callback function that would get called at the start (or just prior to) the exposure mode, so I could trigger the flash at the same time, and then also get a callback at the END of the exposure mode so that I could then call the image capture function.

The avicap32.dll does not appear to provide that capability. Or does it?

Are there other ways to access a webcam that would provide the necessary capability?