Hello,
I need help capturing still images over individual cameras connected to Quad-Camera Stereo Synchronized Kit (SKU: B0388).
I was able to access all 4 cameras simultaneously by setting up the dtoverlay parameter in the /boot/firmware/config.txt as follows:
[all]
dtoverlay=imx519
All the four cameras show up under the same camera number 0.
Now, I tried using the mux option for the dtoverlay as follows:
[all]
dtoverlay=camera-mux-4port,cam0-imx519,cam1-imx519,cam2-imx519,cam3-imx519
With this option, none of the camera are detected:
My Raspberry Pi 5 OS details are as follows:
Linux raspberrypi 6.12.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.20-1+rpt1~bpo12+1 (2025-03-19) aarch64 GNU/Linux
Need Help.
Thanks in advance!
Hi @pyadav,
Don’t use this for the quadcam HAT kit:
dtoverlay=camera-mux-4port,cam0-imx519,cam1-imx519,cam2-imx519,cam3-imx519
Instead, you need to make sure i2c is enabled in /boot/firmware/config.txt. I don’t have the pi near me, but I think it is something like dtparam=i2c_arm=on (?) near the top of that file.
Assuming that libcamera-still shows you all four cameras at once, you have to use i2c to change the camera.
Check this particular section of the docs: Quick Start Guide for Arducam CamArray HAT Kit - Arducam Wiki , and here a summary/paraphrase:
You need to figure out which i2c address the HAT is on using i2cdetect --list and i2cdetect -y BUS (where BUS is a number from the list). On my particular Pi5, its on bus 11. The bus number is different for CAM0 vs CAM1. It is also different on my CM5.
Assuming bus 11, I run: i2cset -y 11 0x24 0x24 DATA, where DATA is one of the following values:
0x02: camera 0 only
0x12: camera 1 only
0x22: camera 2 only
0x32: camera 3 only
0x00: all four cameras
0x01: camera 0 and 1 (not as useful to me)
0x11: camera 2 and 3 (not as useful to me)
You can test it live in a different terminal window while libcamera-still -t 0 is running, and the cameras switch almost instantly. From my experience, the setting persists until it is changed again by i2cset or upon a reboot.
i2c commands may require sudo if your user is not in the i2c group
Hope that helps!
1 Like
Hello @simplesimon, Thank you for the information. I tried using the I2C switch as you mentioned, and I can access the cameras individually.
I am actually trying to capture images from the 4 cameras simultaneously. If I use the Libcamera-still device driver with the I2C selection of all 4 cameras, a single image with 4 quadrants dedicated to each camera is generated and saved. The resolution of the saved image is basically divided into 4 parts. Can you please recommend an approach (Preferably simultaneous image capture) to save 4 separate images (Resolution: 1920 x 1080, Compression: JPG) for the 4 cameras?
PS: I can also create a new topic for this request. Let me know.
Yeah, maybe start a new thread for that. The forum software is nudging me to not add more here.