简体   繁体   中英

How to reduce capturing time in raspberry pi camera?

I am working on a program on raspberry pi b+ model, my program needs to capture images from a raspberry pi camera attached i used this code to capture images:

cmd='raspistill -o '+filename+' -t 10 -ex auto -awb auto -w 800 -h 600 '
pid=subprocess.call(cmd,shell=True)

when i tested this code the time for running just these two lines of code was about 1 second and this is way too much time

my question: is there any way to reduce time of capturing images, or is there any other features that can be added to the code to reduce the time of capturing ?

Disabling the preview with -n ( --nopreview ) parameter may reduce the time.

cmd='raspistill -o '+filename+' -t 10 -n -ex auto -awb auto -w 800 -h 600 '
pid=subprocess.call(cmd,shell=True)

If writing to the SD card is the bottleneck (should not be, as they usually are fast enough), maybe saving the file to a in-memory filesystem would speed up taking the picture. You can sync the files to the sd card at some point later (eg cronjob with rsync ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM