ArduCAM 108MP: green frames with color_mode 0/3, red with 1/2 on Windows 10 Python

Hi, I’m trying to get a normal color image out of my 108MP camera but everything comes out tinted.

I can capture frames fine, but they’re green shaded when I use color_mode = 0 or 3. If I switch to color_mode = 1 or 2, the image comes out red shaded instead.

I just want a normal “true” color image (I get that the exact color will depend on monitor settings and so on).

Setup:

  • Python3 on Windows 10
  • Config file: ArduCAM_USB_Camera_Shield/Config/USB3.0_UC-593 Rev.C/MIPI/ArduCAM_108MP/ArduCAM_108MP_MIPI_2Lane_RAW8_12000x9000_1.4fps.cfg
  • Demo script: ArduCAM_USB_Camera_Shield_Python_Demo/ArduCam_Demo.py

No logs, just the tinted frames. I’ve tried all four color_mode values (0/3 = green, 1/2 = red) and none of them look right. Any idea what I’m doing wrong?

Hi, sorry for the slow reply — the team has been out for the past few days, catching up now.

Thanks for the details on the config and the demo script, that helps. Before I can say much about the color, could you share an actual image captured by the camera? Even one frame would help a lot for the analysis — it lets me check the pixel pattern and confirm what the sensor is actually outputting.

A full-resolution capture is fine, or a crop if the file is too big to attach.

My email client won’t let me send the full image because it’s so large, so I cropped out a section that shows the green.

Here’s the crop: Screenshot 2022-10-11 084525.jpg

Still using the same config (ArduCAM_108MP_MIPI_2Lane_RAW8_12000x9000_1.4fps.cfg) and ArduCam_Demo.py on Python3/Windows 10. The green tint is uniform across the whole image.

Thanks, that crop is helpful.

So here’s what’s going on: the camera has no ISP (Image Signal Processor) in this path, so what you’re capturing is the origin (raw) sensor output. Raw sensor data isn’t color-corrected yet — it needs post-processing to become a proper image. That’s exactly why the untouched raw output looks green; it hasn’t gone through any of that processing.

To get a good, correctly colored image you need to run the raw frame through post-processing (debayer + color correction) rather than viewing it as-is. Keep in mind the demo output with color_mode just changes how the raw bytes are interpreted, it doesn’t do the full ISP job for you.

So the green isn’t a fault in the frame itself, it’s the raw pattern showing through. Applying proper post-processing is what gets you to a true-color image.

Okay, that makes sense — the raw image needs to go through a debayering algorithm, and it looks like that’s what’s implemented in ImageConvert.py under the convert_image function.

But when I call the cv2 debayering functions there, the image is still green. So something isn’t working the way I’d expect.

Can you send me a script that actually post-processes the images into natural color? I think the one on GitHub doesn’t work as-is and needs to be corrected. I’m running Python3 on Windows 10 with the same ArduCAM_108MP_MIPI_2Lane_RAW8_12000x9000_1.4fps.cfg and ArduCam_Demo.py.

Quick summary of where we are so we’re on the same page:

  • The 108MP camera output here is raw sensor data with no ISP applied, so it comes out green until it’s post-processed.
  • color_mode 0/3 gives green, 1/2 gives red — that’s just how the raw bytes are being interpreted, not a true-color path.
  • We confirmed the green on your cropped capture.
  • You tried the cv2 debayering in ImageConvert.py → convert_image(), and it still comes out green.

Since the GitHub debayering path isn’t producing natural color for you, I’ve sent you a script package through private message — please check it and try running it on your raw frames. If it still comes out green after that, send me the exact debayer parameters you’re using (the Bayer pattern code you pass to cv2) and a small crop of the result, and we’ll dig into whether it’s a wrong Bayer pattern or something further downstream in the pipeline.