I wish to deploy this RPi along with the attached camera module to a factory floor and then analyze the video stream. Hence, I have a headless RPi which I plan to use for this purpose.
import time from picamera2 import Picamera2, Preview picam = Picamera2() config = picam.create_preview_configuration() picam.configure(config) picam.start_preview(Preview.QTGL) picam.start() time.sleep(2) picam.capture_file("test-python.jpg") picam.close()
[2:49:33.584694604]  INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f [2:49:33.701068350]  INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/imx708@1a to Unicam device /dev/media2 and ISP device /dev/media1 [2:49:33.701156145]  INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml' [2:49:33.708057499]  INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-XBGR8888 (1) 1536x864-SBGGR10_CSI2P [2:49:33.708623451]  INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/imx708@1a - Selected sensor format: 1536x864-SBGGR10_1X10 - Selected unicam format: 1536x864-pBAA qt.qpa.xcb: could not connect to display :1.0 qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb. Aborted