So I finally got it to work (I simply have to use capure_array("main") in a loop to receive the images from the camera). Theres one single issue I would like to solve. Is there a way to restart the camera after it had a timeout/crashed without having to restart the the pi every single time? Currently I have to restart the pi every time the script fails to execute.The camera shouldn't be producing any images at all when it's in trigger mode and is not triggered. The most likely explanation is that the camera has not been put into trigger mode, and is just free-running.
Make sure you've done this step, which needs to be repeated every time the Raspberry Pi is booted. (Recent versions of the driver also allow you to use a dtparam which for bogus reasons is called "sync-sink", as in the synchronized cameras case.)Code:
echo 1 | sudo tee /sys/module/imx296/parameters/trigger_mode
Then, if trigger pulses could be more than 1s apart, you'll also need to edit a configuration file, like this (except our documentation is slightly wrong here -- the commented-out line might not exist!)
This quick and dirty bash script might do the trick:then run the Python script.Code:
cp /usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml timeout.yamlsed -i '/ {/a "camera_timeout_value_ms" : 60000,' timeout.yamlexport LIBCAMERA_RPI_CONFIG_FILE=timeout.yaml
Statistics: Posted by Aipathon — Tue Jul 15, 2025 2:06 pm