Black spots and foggy lens on Raspberry Pi camera (Raspberry Pi 4B)

Hi all. I’m stuck with an Arducam 8MP IMX219 camera module (ASIN B0834XSLZM) on a Raspberry Pi 4B. It worked fine for a while, then out of nowhere I’ve got 2 black spots on the picture that won’t go away, and the lens looks foggy and basically isn’t working.

I already tried cleaning the lens with a microfiber cloth — no change. I don’t think it’s a focus problem either, because the lens was already focused before.

Here’s what I’m seeing in the preview:

image-1.png

Any ideas what’s going on?

Thanks for the screenshots. First thing to narrow it down: do those two black spots show up when the camera is in live preview (e.g. libcamera preview window or raspistill -p), or do they only appear in saved images? That tells us whether it’s coming from the lens/sensor side or further down the capture pipeline.

Yes, they’re there in live preview too — always in the same two spots, doesn’t matter what I point the camera at.

Got it, that points more toward the lens/sensor side. Two more things:

  • When you say the lens is ‘foggy’, do you mean the image looks hazy/blurry and it can’t focus, or is there actual clouding/condensation on the glass?
  • Have you screwed/rotated the lens to try focusing it? If so, does the ring turn normally and does the image change at all?

The glass itself doesn’t look cloudy — it’s the picture that looks hazy and soft, and I can’t get it sharp. And yes, I’ve rotated the lens to focus. It was already focused, and turning it either way just makes it blurrier, never clean.

Thanks, that’s helpful. So the picture so far is: black spots visible in live preview in fixed positions, plus a hazy image that won’t focus even though the lens was previously set and the outer element was cleaned. Since cleaning the outside didn’t change anything and refocusing doesn’t clear it up, this looks like it could be contamination/damage inside the lens assembly or on the sensor itself, or a focus adjustment problem. We haven’t pinned down the exact root cause yet, but those are the two directions we’re looking at. I’ll follow up here once I have a better read on it.