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

Camera board • Re: Picamera2 capture_circular no preview

$
0
0
The example seems to be missing an import of Preview.
And also needs a QT preview 'option' set. (Because of the RGB888 format used)

Code:

from picamera2 import Picamera2,Previewfrom picamera2.encoders import H264Encoderfrom picamera2.outputs import CircularOutputlsize = (320, 240)picam2 = Picamera2(0)video_config = picam2.create_video_configuration(main={"size": (1280, 720), "format": "RGB888"}, lores={                                                 "size": lsize, "format": "YUV420"})picam2.configure(video_config)picam2.start_preview(Preview.QT)
Edit PS if running outwith a GUI a Preview.DRM should also work - not checked though!

Statistics: Posted by sandyol — Wed Feb 21, 2024 1:10 pm



Viewing all articles
Browse latest Browse all 4906

Trending Articles