Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4853

Camera board • Re: Picamera2: resolution of the preview screen and the shooting resolution

$
0
0
This script does the preview then applies the still configuration and captures an image to a file.

Code:

from picamera2 import Picamera2, Previewfrom time import sleeppicam2 = Picamera2()preview_config = picam2.create_preview_configuration({"size":(1920, 1080)})capture_config = picam2.create_still_configuration({"size": (4608, 2592)})picam2.configure(preview_config)picam2.start_preview(Preview.QTGL)picam2.start()sleep(4)picam2.stop_preview()picam2.stop()picam2.configure(capture_config)picam2.start()picam2.capture_file("image.jpg")

Statistics: Posted by neilgl — Wed Jul 24, 2024 5:53 pm



Viewing all articles
Browse latest Browse all 4853

Trending Articles