[libcamera-devel] How to activate AGC control in libcamera, or set the GAIN/EXPOSURE parameter by v4l2 command.
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Oct 7 04:36:55 CEST 2020
Hi David,
On Mon, Oct 05, 2020 at 07:31:43AM +0100, David Plowman wrote:
> Hello Nomura-san
>
> Thank you for your message.
>
> It sounds likely that the AGC is running at its maximum values, that
> is, the exposure time has reached its maximum, and the gain has
> reached its limit too. Under these conditions changing the y_target
> will not have any effect.
>
> In normal circumstances I would expect that you could replace the
> y_target in the json file by (for example)
>
> "y_target":
> [
> 0, 0.32, 1000, 0.33, 10000, 0.34
> ]
>
> and this would double the exposure (as I have doubled all the target
> values). However, when the AGC has reached its limits this will not
> make any difference, and I would guess this is what's happening in
> your case.
>
> We could confirm this by collecting some debug. I'm intending to do
> some maintenance on the AGC in the coming days, part of which will
> replace the debug messages by libcamera debug which can be enabled
> without recompiling. For the moment, unfortunately, you would have to
> edit the code (add "#define RPI_LOGGING_ENABLE 1" to the top of
> agc.cpp) and recompile. If you were able to capture the last ~50 lines
> of this debug it would probably clarify the situation for us.
By the way, for your information, we're working on adding more
instrumentation to libcamera to help with debugging. One candidate we're
looking at is lttng-ust. If you have a wish list when it comes to the
features you'd like to see, in addition to normal log messages, to help
debugging issues, please feel free to share it.
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list