Need OpenCV Python depth mapping documentation for Arducam 1MP stereo camera on Raspberry Pi 4

Hi everyone, I’m trying to do depth mapping with the Arducam 1MP stereo camera on a Raspberry Pi 4. The module is the dual OV9281 monochrome global shutter one (https://www.arducam.com/product/arducam-1mp-stereo-camera-for-raspberry-pi-nvidia-jetson-nano-xavier-nx-dual-ov9281-monochrome-global-shutter-camera-module/). I can get a normal video stream working with libcamera-hello, so the camera itself seems fine. What I can’t find is any documentation on doing depth mapping with OpenCV and Python. Is there a guide for this?

Thanks for the details. Since libcamera-hello works, the basic camera/streaming path is fine, so this is specifically about the depth-mapping side. Could you share the script you’ve tried so far and any error/output you’re seeing? Also, which setup guide did you follow when wiring up the stereo module?

I followed the Multi-Camera CamArray quick start (Quick Start Guide for Arducam CamArray HAT Kit - Arducam Wiki). I don’t actually have a script yet - I got stuck at the documentation stage. I just need to know how to grab both OV9281 feeds and compute a depth/disparity map. There’s no specific error because I haven’t gotten that far.

Understood. I checked on this one internally: depth mapping for the 1MP stereo camera hasn’t been updated yet. The existing depth-mapping examples are built on the older camera stack and haven’t been made compatible with the new libcamera stack. So right now there’s no immediate fix or working example I can hand you. I’ll follow up here once the compatibility work is done - for now it’s a matter of waiting.

Okay, thanks - I’ll keep an eye on this thread. While I’m waiting, I have a separate setup I’m stuck on. I’m also using an IMX519 camera on the quad camera hat and I can’t access it from Python at all. I tried the thread at How to use code to access libcamera(C++/Python) but it didn’t work for me. Is there a proper tutorial for this?

For the IMX519 on the quad camera hat, the supported way to access it from Python is PiCamera2. Have you tried any of the example scripts from the picamera2_examples repository yet, or only that forum thread?

Only the forum thread so far. It didn’t work, so I came here looking for the right docs. Happy to try whatever you recommend.

Start with the PiCamera2 user guide: Picamera2 User Guide - Arducam Wiki - that covers setup and basic usage. Then grab the example code from GitHub - ArduCAM/picamera2_examples · GitHub. Those examples should get the IMX519 on the quad camera hat working from Python; the thread you found is older and not the right approach for this camera. To summarize the thread so far: the 1MP stereo depth mapping is still pending because it depends on the older stack, and for the IMX519, PiCamera2 plus the examples repo is the recommended route.