Set exposure bias? #131
-
I would like to add the ability to adjust exposure bias to the still capture example, but I couldn't find how this is done. Is there some example for this somewhere? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
I figured part of it: |
Beta Was this translation helpful? Give feedback.
-
Currently libcamera doesn't fullfil a guarantee for 'per frame controls' ... this is because it can take up to 3 frames to set the Exposure, so we have to rework the internals to ensure that the exposure is set 3 frames earlier than requested. |
Beta Was this translation helpful? Give feedback.
-
Could you say a little more about what you're trying to do? I'd expect changing the ev and having a short pause would work. But maybe you can just run the camera permanently with higher ev? Or possibly you could stop the camera and recalculate the exposure/gain for yourself before doing the capture. This example does something a bit like that. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to do the same as what I alluded to in my other post. The idea is a still image server were the parameters (in particular ev) can be passed in the HTTP request and directly applied to the returned image. |
Beta Was this translation helpful? Give feedback.
-
Just to add one more thing on this topic. The thing about "ev" is that it adjusts the target the AGC/AEC is aiming for, so once you change it, it takes a little while to have an effect. If you want to adjust the exposure just for a capture, this kind of thing works:
This script runs a preview and then, every 2 seconds, takes a full resolution capture. The capture has twice the exposure and twice the gain of the normally exposed image. The key point is that setting a new exposure time and gain before restarting the camera means it takes effect immediately. When we return to preview, notice how we set the exposure and gain back again before the camera is restarted, so be sure we go straight back to the normal exposure level without the images being briefly over-exposed. Afterwards we also re-enable the AGC/AEC again. |
Beta Was this translation helpful? Give feedback.
Just to add one more thing on this topic. The thing about "ev" is that it adjusts the target the AGC/AEC is aiming for, so once you change it, it takes a little while to have an effect. If you want to adjust the exposure just for a capture, this kind of thing works: