Hi everyone, I’m trying to get an Arducam Pivariety 16MP IMX298 camera working on a Raspberry Pi 4. The goal is to open the camera, capture images, and show the live feed in a tkinter window using Python. I’ve been trying to use the cv2 library (OpenCV) for this, but I just can’t get it to open or capture the camera feed at all. Has anyone used this particular camera with OpenCV on the Pi? Is there a Python API/library that works better for controlling it and displaying the feed in tkinter?
Thanks for the details. Before we go further into the camera side of things, have you had a chance to check Arducam’s documentation on accessing the camera and sending control with OpenCV? There’s a section on using OpenCV with Python and GStreamer on Linux that covers exactly this scenario: Access UVC Cameras using OpenCV, Python, and GStreamer on Linux - Arducam Wiki. That’s the recommended path for the Pivariety series on a Raspberry Pi, since a plain cv2 capture often won’t work without the proper GStreamer pipeline.
Thanks for the link. I went through that section, but now I’m stuck on an earlier step: I can’t even get opencv-python installed on the Raspberry Pi 4. The installation keeps failing, so I haven’t been able to test the GStreamer approach from the documentation yet.
Ah, if the blocker now is that opencv-python won’t install on the Raspberry Pi 4, that’s more of an environment problem on the Pi side than something related to the Arducam camera itself. The camera doesn’t affect Python package installation. For this one I’d recommend asking on the official Raspberry Pi forum, since they have people who deal with opencv-python installation issues on the Pi all the time. Once you get OpenCV installed, the GStreamer approach from the docs should still be the way to get the Pivariety feed into cv2 and then into your tkinter UI.