Files
Scripts_Raspberry/Camera/camera_sequence.py
2019-02-04 10:14:50 +01:00

19 lines
621 B
Python

# https://picamera.readthedocs.io/en/release-1.10/recipes1.html#capturing-consistent-images
import time
import picamera
with picamera.PiCamera() as camera:
camera.resolution = (1280, 720)
camera.framerate = 30
# Wait for the automatic gain control to settle
time.sleep(2)
# Now fix the values
camera.shutter_speed = camera.exposure_speed
camera.exposure_mode = 'off'
g = camera.awb_gains
camera.awb_mode = 'off'
camera.awb_gains = g
# Finally, take several photos with the fixed settings
camera.capture_sequence(['/home/pi/Desktop/image%02d.jpg' % i for i in range(10)])