Using 2 different MIPI cameras

StereoPi v2 hardware questions
Post Reply
thntpl
Posts: 2
Joined: Tue May 17, 2022 9:49 pm

Using 2 different MIPI cameras

Post by thntpl »

Hello,
Recently I purchased a StereoPi V2 kit for a project that I need access to two cameras. The two cameras (IMX219) came with the kit work fine together.
Now I would like to replace one IMX219 camera with another type (IMX290) which has a different dtoverlay.
However, I have trouble getting both camera to show up. I hope someone here may have a suggestion for how to setup the /boot/config.txt file so both cameras can be access by raspivid software

Thanks,

User avatar
Realizator
Site Admin
Posts: 900
Joined: Tue Apr 16, 2019 9:23 am
Contact:

Re: Using 2 different MIPI cameras

Post by Realizator »

Hi thntpl,

Your situation requres some advanced tricks and settings. To say briefly, you won't be able to solve this using the regular raspivid/raspistill approach, due to the fact that in this case video subsystem is able to use only a single driver for the camera.

To get system working you need to load two independent driver instances (with appropriate settings) and access each camera as an independent device. I'd use the newer video subsystem (libcamera-based) and gstreamer access to each video device.
Eugene a.k.a. Realizator

thntpl
Posts: 2
Joined: Tue May 17, 2022 9:49 pm

Re: Using 2 different MIPI cameras

Post by thntpl »

thanks for your reply.
I am willing to go with libcamera or gstreamer. If you could point me to a right place to get the document of how to set up the config.txt so that I could load two different drivers imx219 and imx290 for example and then have them show up on the "libcamera-vid --list-cameras"
Thanks again.

Post Reply