waveform80 / picamera

A pure Python interface to the Raspberry Pi camera module
https://picamera.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.57k stars 357 forks source link

Limited running time #710

Open li779 opened 2 years ago

li779 commented 2 years ago

In my program, picamera takes 20s to take a picture with exposure value of 6s. Any suggestions on why this happens and how we can improve the running time? The camera I am using is in V1 mode and other parameters are following: brightness 50 analog gain 1 color effect None crop (0.0, 0.0, 1.0, 1.0) digital gain 17/16 drc strength off exposure compensation 0 denoising False meter mode average saturation 0 sharpness 0

6by9 commented 2 years ago

This has been covered multiple times in the forums.

Any frame that is requested will be completed. On changing mode/starting the sensor the first frames after the switch is always dropped as it is incorrectly exposed.

With the normal mode of operation a preview frame is requested, first frame is dropped, second frame is captured to generate the preview frame, then the sensor changes mode for the capture, drops the next frame, and captures the second one. If the exposure time is 6 seconds, then each frame takes that long, and I'd expect 24s to complete.

Raspistill gained the option to start in burst mode (which bypasses the preview phase) IFF all parameters are specified manually. https://github.com/raspberrypi/userland/commit/2fe4ca33dc29dc3ede0044d53b0c0abe0ea6536b You can probably do a similar thing under Picamera.