I’m trying to build my own app around the Arducam 200MP, but I can’t find the source code for the library import. I can see where convert_200mp is called:
from arducam_200mp_convert_lib import convert_200mp
…but I can’t find the actual function implementation anywhere. I only need that one function so I can use it with cv2 in my own script.
Thanks, that’s what I was missing. One more thing while I’m porting it: I can’t get cv2 to confirm or set any resolution other than 720p120fps. Is there a specific way to set width/height with OpenCV on this camera?
Actually something bigger is wrong now. I can’t stream any frame rate/resolution above 1280x720@10fps, with either your demo scripts or my own UVC/OpenCV code. The camera seems locked there and doesn’t respond to focus, resolution, or fps changes. I’m on a USB-C to USB-C cable, no adapters.
The RAW conversion also fails. I saved as .RAW using your test script at 1280x720@10fps, then convert.py dies here:
data = data.reshape(height, width)
ValueError: cannot reshape array of size 2764800 into shape (6144,16320)
If I set height=720, width=1280:
data = data.reshape(height, width)
ValueError: cannot reshape array of size 2764800 into shape (720,1280)
Two separate problems here, but they might share a cause. The 1280x720@10fps lock matches USB 2.0 bandwidth limits, which strongly suggests the camera is enumerating as a UVC 2.0 device instead of UVC 3.0. That would also explain why resolution/fps/focus changes don’t stick.
For the reshape error: the byte count 2764800 doesn’t fit 6144x16320, and it also doesn’t fit 720x1280 as a single-channel Bayer buffer. So the saved data likely isn’t the raw Bayer format you expect. Let’s confirm the connection type first, because that’s the thing that gates everything else.
Okay, how do I verify that? I already confirmed the cable is USB-C to USB-C with no adapters, but I haven’t checked how the PC is identifying the device.
Open Device Manager and find the camera. Check whether it’s listed/enumerated as a UVC 3.0 device. Also make sure it’s plugged into a USB 3.0 (usually blue) port on the PC. If it shows up as UVC 2.0 or lands on a USB 2.0 port, you’ll get exactly the 1280x720@10fps ceiling you’re seeing.
Resolution via cv2: cap.set(cv2.CAP_PROP_FRAME_WIDTH, ...) / cap.set(cv2.CAP_PROP_FRAME_HEIGHT, ...).
The locked 1280x720@10fps rate matches USB 2.0 bandwidth, so the camera is likely not on a USB 3.0 link. Check Device Manager for UVC 3.0 and move it to a USB 3.0 port, then retry the RAW capture/conversion.