Python 3 example needed to control Arducam 8MP Synchronized Quad Camera Bundle Kit

Hi everyone. I just got the Arducam 8MP Synchronized Quad Camera Bundle Kit and I’m trying to control the four cameras from Python 3. Does anyone have a python3 example I can use to handle/access the cameras? Right now I can only find C examples and I’m kind of stuck on how to get started from Python.

Hi, thanks for posting. A couple of quick questions so I can point you the right way:

  1. Which board are you running this on (Raspberry Pi 4, Pi 5, etc.)?
  2. Which OS/version are you using?
  3. Have you already got the cameras showing up, e.g. does libcamera-hello --list-cameras detect them?

Knowing that will help me figure out what access path works for your setup.

It’s on a Raspberry Pi 4 running Raspberry Pi OS (Bullseye). I haven’t tried too much yet because I mostly want to drive it from Python. I can check the camera detection if that helps.

Yeah, please run libcamera-hello --list-cameras and paste the output. To set expectations up front: right now Arducam mainly uses the libcamera apps to access the camera, so the standard way to grab frames is with the libcamera tools on the Pi. A finished python demo for this camera isn’t officially released yet, so there’s no drop-in Python3 module I can hand you for the quad kit.

Ok that explains why I couldn’t find a python example. So if I want to work in Python3, what are my options? I was really hoping to control the cameras programmatically rather than from the command line.

Understandable. Since the full python demo isn’t done yet, the closest working python reference we have is the demo in our Motorized_Focus_Camera repo:

Have a look at the python demo there and try running it. It’s not written specifically for the quad bundle, but it shows the general approach for accessing frames from Python that you can adapt.

Thanks, I’ll pull that repo and try the python demo. Just to confirm one thing: it’s built on top of libcamera under the hood, right? I want to make sure I understand what I’m adapting before I start changing things.

Correct. The official access method is the libcamera apps, and the python demo is essentially a reference wrapper around that path. So think of it as: use libcamera as the underlying access layer, and follow the python demo in the Motorized_Focus_Camera repo as a template for controlling/reading from the camera in Python3. It isn’t a finished, quad-kit-specific python library, but it’s the best starting point right now. Give it a try and let us know how far you get — if you hit errors when running it, paste them here and we can dig in.