Hi everyone, I’ve got a batch of B0324 camera modules (11 units) running on a Raspberry Pi, and a few of them are misbehaving. I submitted two technical support forms describing the errors. One issue is a black-and-white output with green and purple color errors, and there’s also something wrong with autofocus on another unit. Hoping someone can point me in the right direction.
Thanks for the report. To make sure I understand correctly - is it 2 out of the 11 modules that aren’t behaving? And could you share the image that shows the black-and-white output with the green and purple color errors you mentioned in the form? That’ll help me get started.
Sorry, let me correct that - it’s actually 3 cameras with problems in total. 2 have incorrect colors, and 1 has autofocus that doesn’t work. I took comparison photos with my phone: 1A and 1B show the wrong colors (there’s a bit of screen glare, apologies), and 2A and 2B show correct colors for reference.
No worries. Photos of the preview screen can be tricky because of glare, so let’s get direct captures from the Pi instead. For the color issue, please run:
libcamera-still -t 6000 -o 1A.jpg
For the autofocus issue, run:
libcamera-still -t 10000
and paste the output here. After you close the preview window, also send the output of dmesg - I want to check whether the focus driver is even loading properly.
Okay, I did some more digging. On the 2 cameras with bad colors, the problem only appears when I use transform=Transform(hflip=1, vflip=1) in my code. Image A without the flip looks fine, image B with the flip shows the weird colors. For the autofocus camera, I saved the log output into two text files - I can send those over. The bigger issue is that this camera goes into a standard product, so I can’t maintain separate code versions for each camera. I need one codebase that works for all of them.
Got your log files, thanks. For the two color cameras - I don’t have full visibility into your environment, project, code, or setup yet, so I need to reproduce the problem on my side before I can give you a solid answer. Right now all I can determine is that the color channel is abnormal, which by itself doesn’t tell me the root cause. For the autofocus camera, interestingly, the log shows the focus motor is working normally, so that one’s still under investigation too. Could you share details of your environment, project, and code setup so I can try to reproduce the color issue? And a short video demonstrating the autofocus problem would help a lot.
On the autofocus unit - the focus motor isn’t actually running and the focus point never changes, even though the log and the code say otherwise. I’m starting to suspect a hardware fault on that one. I have 14 camera systems all running the exact same code and hardware, and only this one module fails, so consistency matters a lot to me - I need these modules to behave the same way with the same code every time. I’ve attached an excerpt of my code for you to review.
I’ve reviewed your code excerpt. Here’s where things stand: on our side, when we use the libcamera command, the preview works flawlessly and the colors are accurate - so the color discrepancy looks like it’s tied to your system/software rather than the module hardware itself. The fact that the flip transform triggers the color channel issue is the key clue I still need to chase down. If you can share more hints about your system (OS, library versions, how the transform is applied, anything unusual), I’ll keep working on reproducing it. For the autofocus unit, the log says the motor is fine but you’re seeing no focus change in hardware, so that one is still open too.