Raspberry Pi HQ Camera: Neutral v4l2 Settings for Lens Comparison and Vignetting?

Hi everyone, hope someone can help. I’m trying to set up a Raspberry Pi HQ camera so it’s as neutral as possible, the whole point is I want to compare lenses (vignetting, color, sharpness falloff etc) and I don’t want the camera itself messing with the image. So my questions: does this camera do any vignetting correction internally? And if it does, can I turn it off? I also need help configuring the camera controls so everything is as neutral/linear as possible. Any pointers appreciated.

Hi - happy to dig in. Can you tell me a bit more about the exact setup you’re running? Which camera board and which interface/adapter are you using, and what driver is it showing up as? Also, if you’re on Linux, could you paste the output of v4l2-ctl -d0 -l so we can see which controls are actually exposed on your device? That’ll tell us a lot.

Sure. Setup is:

  • Raspberry Pi HQ camera (bought from Amazon)
  • Camera board: UC-517 Rev-B
  • USB interface board: UC-733
  • Driver/v4l2, device is -d0

So it’s the HQ camera going through the UVC adaptor basically.

Got it, thanks. That’s the HQ camera adapted over UVC. Can you paste the full control listing (v4l2-ctl -d0 -l)? I want to see what’s exposed before I say anything about neutral values, because a lot of what you can set depends on what the UVC side reports.

Here’s the full output:

$ v4l2-ctl -d0 -l
brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0   -> is 0 neutral?
contrast 0x00980901 (int) : min=0 max=64 step=1 default=32 value=32      -> is 32 neutral?
saturation 0x00980902 (int) : min=0 max=128 step=1 default=64 value=64    -> is 64 neutral?
hue 0x00980903 (int) : min=-40 max=40 step=1 default=0 value=0            -> is 0 neutral?
white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1      -> does value=0 mean OFF (no auto WB)?
gamma 0x00980910 (int) : min=72 max=500 step=1 default=100 value=100     -> which value is gamma=1 (linear)?
gain 0x00980913 (int) : min=0 max=100 step=1 default=0 value=40           -> how do I convert this to dB?
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2 (60 Hz)
white_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive -> does value=4600 mean no white balance?
sharpness 0x0098091b (int) : min=0 max=6 step=1 default=3 value=3         -> which value means NO processing (no sharpening, no softening)?
backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=1 value=1 -> does value=0 mean no compensation?
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=1 (Manual Mode)
exposure_absolute 0x009a0902 (int) : min=1 max=5000 step=1 default=157 value=1500 -> are exposure units in milliseconds?
exposure_auto_priority 0x009a0903 (bool) : default=0 value=0            -> what does this control do?
focus_auto 0x009a090c (bool) : default=1 value=1                        -> does value=0 mean No Auto Focus? (not applicable to my camera anyway)

I put my questions inline next to each one - basically I’m trying to figure out which settings give me a neutral, untouched image.

Thanks, that’s a really clear list. Let me be straight with you though: on the UVC adaptor side, Arducam doesn’t currently provide image modification. What you’re seeing in that control list is essentially the generic UVC control set reported by the driver, and we don’t have an ISP/image-modification path we expose for this adaptor setup. So I can’t give you a reliable answer on things like which gamma value equals linear, how gain maps to dB, or which sharpness value is truly “no processing” for this specific pipeline - those mappings aren’t something we define or publish for the UVC adaptor.

Same goes for your main question: the vignetting correction you’re asking about isn’t something we provide on this adaptor, so there’s no setting on our side to switch it on or off.

Hmm, that’s a bit of a problem for me. So essentially there’s no way to control the image in a neutral way through this USB adaptor? Not even by turning off auto WB and going fully manual with exposure and gain? I was really hoping to get a clean baseline for lens comparison.

Correct - with the UVC adaptor, image modification isn’t something we offer, so there’s no variant of this setup where I can hand you a neutral/linear configuration recipe. Setting manual exposure/WB will stop the auto side from hunting, but that doesn’t give you an untouched image pipeline, and I can’t quantify the internal processing for you.

If your requirement really is image modification / a controllable image pipeline, we do have other options that would suit it better. There are four cameras that would fit what you’re after - I’ve sent you a screenshot showing those through private message. You can also browse them here:

Worth a look, they’re a much better match for lens-comparison work than the UVC-adapted HQ camera.

OK, I checked the link and the screenshot - I’ll dig into those options. Bit disappointing about the adaptor but good to know I won’t waste more time chasing controls that aren’t really exposing what I need. Thanks for the quick reply.

No problem. Quick recap for anyone finding this thread later:

  • Setup: Raspberry Pi HQ camera over the Arducam UVC adaptor (camera board UC-517 Rev-B, USB interface UC-733), showing up as a v4l2/UVC device at -d0.
  • Goal: a neutral image for lens comparison, and specifically the question of vignetting correction.
  • Outcome: the UVC adaptor does not provide image modification on our side, so there’s no supported way to make it “untouched”, and no vignetting-correction setting to enable/disable. The control values listed by v4l2-ctl -d0 -l come from the generic UVC control set, and the exact neutral/linear mappings aren’t something we publish for this adaptor.
  • Recommended path: if image modification/control is a hard requirement, look at the IMX298 options we sent rather than trying to neutralise the UVC-adapted HQ camera.

If you get one of those cameras and want help with the control setup on it, just start a new thread.