v4l-ctl settings for low light IMX291


I’ve been working with the 1080p UVC Arducam USB module that uses the IMX291 sensor (UB020201)

I’m trying to optimise its use at night, and have been trying various different v4l settings when connected to a pi running raspbian. The defaults are:

brightness 0x00980900 (int) : min=-64 max=64 step=1 default=0 value=0
contrast 0x00980901 (int) : min=0 max=64 step=1 default=32 value=32
saturation 0x00980902 (int) : min=0 max=128 step=1 default=64 value=64
hue 0x00980903 (int) : min=-40 max=40 step=1 default=0 value=0
white_balance_temperature_auto 0x0098090c (bool) : default=1 value=1
gamma 0x00980910 (int) : min=72 max=500 step=1 default=100 value=100
gain 0x00980913 (int) : min=0 max=100 step=1 default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=2 default=1 value=1
white_balance_temperature 0x0098091a (int) : min=2800 max=6500 step=1 default=4600 value=4600 flags=inactive
sharpness 0x0098091b (int) : min=0 max=6 step=1 default=3 value=3
backlight_compensation 0x0098091c (int) : min=0 max=2 step=1 default=1 value=1
exposure_auto 0x009a0901 (menu) : min=0 max=3 default=3 value=3
exposure_absolute 0x009a0902 (int) : min=1 max=5000 step=1 default=156 value=4154 flags=inactive
exposure_auto_priority 0x009a0903 (bool) : default=0 value=0
I recognise that low light performance is likely to be a trade-off of features - I was wondering if anyone here had experience of these trades and could suggest some starting points above.


I was looking at enabling exposure_auto_priority:

v4l2-ctl --set-ctrl=exposure_auto_priority=1

which as I understood it should drop frame rate to increase sensitivity - but I wasn’t able to see if it made a difference!
7.What attempts at troubleshooting have you already made?

8.How would you like us to help you?


The exposure_auto_priority control seems to control auto and mannual exposure mode.

If you want to change the framerate, you can try to reduce the exposure time. (exposure_absolute )



Please ignore the previous reply.

The exposure_auto_priority is useless.

If you want to manually control the exposure time, you can turn off the auto exposure mode first by set exposure_auto=1, and then adjust the exposure time by adjusting the value of exposure_absolute.

Ah - that’s a pity - my understanding (hope) had been that exposure_auto_priority would allow the camera firmware to drop frame rate / increase exposure as light level dropped.

However, as it stands the camera does not have particularly good low light performance…I can improve it by manually changing the frame rate and exposure, but then have to manually change it back again when it gets brighter!

Are there any solutions to this, or alternative similar units in the range that might have better success?


At present, our UVC cameras have a fixed frame rate, which means that the exposure will not be increased by dropping frames in the dark.

Your suggestion is good, but most people’s needs are fixed frame rates, so we can only follow the needs of most people.
In the future, we may explore the possibility of adding an optional switch between dropped frames and non-dropped frames. But for now, the camera you buy can only fix the frame rate or manual exposure to drop frames.



By default there is some auto-exposure control, as can be seen when there is a rapid change in scene brifghtness. If the frame rate stays constant is this acheived by automatically varying the gain?

Under manual control, altering the exposure will have the side effect of dropping the frame rate?

I could I suppose script this to change at certain times of day (daytime / nighttime)

Doing this automatically for a low-light camera would be really helpful, though I understand you have to be led by what customers want.




When the frame rate is fixed, the exposure and gain will be adjusted automatically, but the upper limit of the exposure is fixed.
When manually controlling the exposure, the frame rate will be reduced when the exposure is longer. If the exposure is set to a lower level, it will not affect the frame rate.
We will take into account the needs you mentioned in the later research and development, but for now, it can only be in your hands. Sorry for affecting your use.

How are you changing the framerate? I can only get 30FPS with gstreamer, nothing lower.


The camera in your hand can only reduce the frame rate by manually adjusting the exposure time.

It the upper limit of gain set as well? I find that with exposure set to auto, in very low light scenarios I can get a much better image, without too much noise, by manually increasing the gain using v4l commands - but then when light levels increase, the gain remains too high - and so the image becomes saturated


The gain you use v4l to control is actually digital gain, and what we control in exposure is analog gain. Therefore, although the analog gain has reached the upper limit, the digital gain is still adjustable. The disadvantage is that digital gain is more likely to cause noise.