Hi all, hoping someone can point me in the right direction. I’ve got an Arducam 8MP Pan Tilt Zoom camera (IMX219 sensor) on a Raspberry Pi 5, and I’m trying to run lens shading calibration, but the camera won’t register at all. Running libcamera-still just reports “no cameras available”.
ERROR IPARPI pisp.cpp:275 Tuning data file target returned “bcm2835”, expected “pisp”
That means your tuning file imx219_original.json was written for the legacy bcm2835 ISP. The Raspberry Pi 5 uses the newer PiSP pipeline, and its IPA expects the tuning data to declare target “pisp”. Because the target doesn’t match, the IPA library fails to load (that’s the pipeline_base.cpp:798 error), and then camera registration fails with -22, which is why you get “no cameras available”.
So the camera hardware is probably fine - it’s the tuning file that’s wrong for the Pi 5. Where did imx219_original.json come from? It looks like it was built for an older Pi.
It came with the camera materials I got for the PTZ board. I hadn’t realised tuning files were ISP-specific. Is there a Pi 5 version of the tuning file for this sensor, or do I need to convert this one somehow?
You need a tuning file whose target is “pisp”. I’ve sent you a Pi 5-compatible tuning file, imx219_120d.json, via private message - please check your messages.
That worked - the camera now registers and I can capture. Thanks! I also use the PTZ Python demo for this camera. How do I make it load the same tuning file? At the moment the demo initializes the camera itself.
I made the change and FocuserExample.py runs fine now. The image is noticeably better than before, but I still see a slight red shading toward the edges. Is there a way to tune that out manually? I’d like to fine-tune the lens shading myself rather than just live with it.
The remaining red shading on the edges is lens shading that can be adjusted in the tuning file itself. The official Raspberry Pi Camera Guide covers this - have a look at chapter 6, which goes through camera tuning:
Chapter 6 walks through the tuning process and how to adjust the lens shading tables manually, which is what you’d tweak for the residual red edges.
So to sum up: the original failure was the bcm2835 vs pisp tuning target mismatch on the Pi 5, imx219_120d.json fixes registration and gives a better image, and the remaining edge shading can be fine-tuned following chapter 6 of the guide.