Lens shading issue with OV5647 Arducam and LN001 lens

Hey everyone, I’m having a lens shading problem with my OV5647 Arducam camera that has the LN001 lens fitted. The images come out discolored — the center looks roughly fine, but there’s a noticeable color shift toward the edges and corners. It’s like a green/pink tint gradient across the frame and it shows up in every shot regardless of lighting. Has anyone run into this with the LN001 lens specifically?

Thanks for the report. To make sure I’m looking at the right combination — this is the Arducam 5MP OV5647 with the LN001 lens, correct? Also, what software stack are you using to capture (libcamera, raspistill, custom V4L2)? If you have any sample images or logs from the capture pipeline, that would help narrow it down.

Yes, it’s the Arducam 5MP OV5647 with the LN001 lens. I’m using libcamera on a Raspberry Pi. I don’t have logs handy right now, but the discoloration is consistent across different exposures and scenes. I can grab some sample shots if that would help.

I’ve checked on this combination. Unfortunately, we don’t currently have a lens shading tuning/calibration file for the OV5647 sensor paired with the LN001 lens, so there isn’t a ready-made solution for this specific lens shading problem at the moment. The workaround would be to generate your own lens shading calibration JSON file by following the steps in the Raspberry Pi Camera Guide.

That’s a bit frustrating. The LN001 lens is listed as being compatible with the OV5647 camera, so I’d expect it to be properly supported. If it’s sold as compatible, shouldn’t the shading correction for that combination already exist? Also, where exactly do I find the steps to generate the JSON file?

I understand the confusion. In this case, “compatible” means the lens physically mounts and produces an image on the OV5647 module, but lens shading correction (LSC) is a separate calibration that has to be generated per sensor-plus-lens combination. For this particular pairing we don’t have a pre-made tuning file available yet. That’s why the shading correction isn’t applied automatically.

For generating your own file, the procedure is in the official Raspberry Pi Camera Guide. The link is: https://datasheets.raspberrypi.com/camera/raspberry-pi-camera-guide.pdf — look for the lens shading calibration section, which covers creating the JSON calibration file that libcamera can apply.

Got it, that makes more sense now. I’ll dig into the guide and try to produce the calibration JSON myself. Any tips on the calibration target or capture conditions I should use so the generated file actually fixes the corner discoloration?

Just to summarize where we’ve landed: the OV5647 with the LN001 lens is a compatible combination, but Arducam doesn’t currently ship a lens shading tuning file for that specific pairing, which is why you’re seeing the discolored corners. The path forward is to generate your own lens shading calibration JSON using the steps in the Raspberry Pi Camera Guide (link above) and apply it in your capture pipeline.

For the calibration itself, follow the guide’s recommendations on a uniform, evenly lit target and try to avoid reflections or shadows across the frame. The more even the illumination during calibration, the better the corner correction will turn out. If you run into issues while generating or applying the JSON, post back here and we can work through it.