How do you quickly capture a series of stills programmatically?
I'm testing an image processing task where I need to perform an action between image captures. Essentially, I want to:
- Capture a reference image
- Turn on a laser diode broadcasting a pattern in front of the camera
- Capture second image
- Turn off laser diode
I'd like this to happen as fast as possible (preferrably under 100ms), so the laser isn't visible for long. What's the most efficient way to implement this?
I'm currently testing raspistill, and although it works, it's very slow. Even with timeout set to 300, which is as low as I can get it before I start having exposure problems, it still takes 1.3 seconds per frame.
This thread mentions running raspistill with a timeout of 0, which effectively turns it into a daemon, and then you can trigger multiple captures from a separate process with a signal. How well does this work?
Are there other techniques I should try?
--burst
mode with--signal
for a shorter time between captures. With that, you might get to 100ms between captures (bearing in mind still port captures require at least 3 frame's worth of time). Otherwise, you'll need to resort to video recording.