Open GuidoBartoli opened 1 year ago
Hi, indeed libcamera does not have a control for setting the max shutter, but for Raspberry Pi sensors we define this in the tuning file. Editing the tuning file would be the correct thing to do.
Does the tuning file expose a max_shutter
value or it is a consequence of changing exposure modes as I did?
The exposure modes define the maximum shutter time. Though note that setting the framerate would limit the shutter time too (for example, at 30fps you can't have more than 33ms even if the exposure mode would allow higher), but it doesn't sound like this is an issue in your case!
Describe the solution you'd like The camera controls should expose the
"AeMaxShutter"
parameter to be set byset_controls()
method equivalent to theSetMaxShutter()
method fromAgcAlgorithm
class API detailed in the Camera Algorithm and Tuning Guide (page 29).
Is there any news about the equivalent in picamera2
(Python) of the SetMaxShutter() function of libcamera
(C++)? Both Raspberry Pi 5 and the Global Shutter Camera have recently come out, but still this functionality does not seem to be present in the latest version of picamera2.
Thanks for the suggestion. You're right that it might be nice to be able to do this at runtime, however, SetMaxShutter()
is a Raspberry Pi specific function, and libcamera normally likes controls to be platform independent. So I don't think we'd have any plans to add anything like this just at the moment, given that it would have to be some kind of vendor specific control. Are there any particular use cases that something like this would enable, and which you can't achieve by editing the exposure modes? Thanks!
Is your feature request related to a problem? Please describe. Using the
picamera2
API, I did not find a way to set a maximum shutter time while retaining the AGC algorithm.Describe the solution you'd like The camera controls should expose the
"AeMaxShutter"
parameter to be set byset_controls()
method equivalent to theSetMaxShutter()
method fromAgcAlgorithm
class API detailed in the Camera Algorithm and Tuning Guide (page 29).Describe alternatives you've considered For my application, I need the maximum exposure time to be no more than 1/400 s to avoid motion blur when capturing a moving object. However, I would also like that, if the lighting is sufficient, the AGC algorithm can use shorter times and smaller analog gains to avoid overexposure (a behavior similar to the "Auto-ISO" mode with the "Min shutter" option enabled in traditional cameras).
Since the default
"short"
exposure mode allows the shutter time to climb up to 120000 us (~1/8 s), I had to manually set the values ofexposure_modes
within the JSON tuning file to set an upper limit. This is how I changed the"short"
mode to achieve a maximum shutter time of 1/400 s:Additional context Nothing to add.