Hi, hoping someone here can point me in the right direction. I have two separate IMX219 Raspberry Pi Camera HD v2 8MPx modules connected through a Multi Camera Adapter Module v2.2, sitting on a Raspberry Pi 4B. What I want to do is capture one still image from the left camera and one from the right camera, something like CameraA.png and CameraB.png. How would I go about doing that?
Second question: is there any ready-made tool to auto-focus these cameras, or does the focus have to be set manually? I’m not picky about the OS – I can use buster legacy or Bullseye, whatever works. I just want to actually capture from both cameras. Thanks in advance.
Thanks for the details. A couple of things to clear up first.
The Multi Camera Adapter Board v2.2 supports 1-4 cameras, so running just two of them is fine and both will be accessible. So your setup itself is workable.
On the autofocus side – there is no autofocus demo for this board. What we do have is a reference autofocus script from the Motorized Focus Camera that you can look at and adapt:
For the capture-from-two-cameras part, can you confirm whether you’re on buster legacy or Bullseye at the moment, and whether you’ve already enabled the camera interface? That affects which capture approach you should use.
Thanks for getting back to me. Here’s the reply I got earlier so it’s all in one place (from Arducam support, 01.06.2022 12:47):
“Multi camera adapter board v2.2 supports 1-4 cameras; using two cameras is accessible. About autofocus: no demo on this board, but a reference autofocus script is provided.”
That tells me the board handles two cameras, which is good. But it still doesn’t really answer the main thing I’m stuck on – how do I actually capture the images? I need the output to be something like ImageCameraA.png and ImageCameraB.png. I’m on Bullseye right now but I can go back to buster legacy if that’s easier. No code written yet, I haven’t gotten that far.
Even though the demo is written for four cameras, the capture loop is what you want – it switches between the camera channels and writes out an image for each one. For your case you’d have it write ImageCameraA.png and ImageCameraB.png instead. Give that a run and let me know what you get (or paste the output if it throws anything).
Okay, I looked at AdapterTestDemo.py. I see it walks through four cameras one at a time and saves a file for each. Since I only have two cameras on the adapter, do I just leave the other two entries out, or do I need to keep the loop as-is and ignore the images from the channels that aren’t populated? I don’t want it hanging or erroring on the empty channels.
Right – the script captures from the four cameras one by one, so it’s meant to be used as a reference for capturing from individual cameras rather than something you run unchanged. Trim the loop down to the two channels you actually have wired up, and rename the outputs to ImageCameraA.png and ImageCameraB.png. That’s the approach to get each camera captured as its own file.
Quick recap of where we landed:
Your hardware (2x IMX219 on the Multi Camera Adapter v2.2 + Pi 4B) is supported – the board handles 1-4 cameras, so two is fine.