#[repr(i32)]pub enum ExposureTimeMode {
Auto = 0,
Manual = 1,
}
Expand description
Controls the source of the exposure time that is applied to the image sensor.
When set to Auto, the AE algorithm computes the exposure time and configures the image sensor accordingly. When set to Manual, the value of the ExposureTime control is used.
When transitioning from Auto to Manual mode and no ExposureTime control is provided by the application, the last value computed by the AE algorithm when the mode was Auto will be used. If the ExposureTimeMode was never set to Auto (either because the camera started in Manual mode, or Auto is not supported by the camera), the camera should use a best-effort default value.
If ExposureTimeModeManual is supported, the ExposureTime control must also be supported.
Cameras that support manual control of the sensor shall support manual mode for both ExposureTimeMode and AnalogueGainMode, and shall expose the ExposureTime and AnalogueGain controls. If the camera also has an AEGC implementation, both ExposureTimeMode and AnalogueGainMode shall support both manual and auto mode. If auto mode is available, it shall be the default mode. These rules do not apply to black box cameras such as UVC cameras, where the available gain and exposure modes are completely dependent on what the device exposes.
\par Flickerless exposure mode transitions
Applications that wish to transition from ExposureTimeModeAuto to direct control of the exposure time without causing extra flicker can do so by selecting an ExposureTime value as close as possible to the last value computed by the auto exposure algorithm in order to avoid any visible flickering.
To select the correct value to use as ExposureTime value, applications should accommodate the natural delay in applying controls caused by the capture pipeline frame depth.
When switching to manual exposure mode, applications should not immediately specify an ExposureTime value in the same request where ExposureTimeMode is set to Manual. They should instead wait for the first Request where ExposureTimeMode is reported as ExposureTimeModeManual in the Request metadata, and use the reported ExposureTime to populate the control value in the next Request to be queued to the Camera.
The implementation of the auto-exposure algorithm should equally try to minimize flickering and when transitioning from manual exposure mode to auto exposure use the last value provided by the application as starting point.
-
Start with ExposureTimeMode set to Auto
-
Set ExposureTimeMode to Manual
-
Wait for the first completed request that has ExposureTimeMode set to Manual
-
Copy the value reported in ExposureTime into a new request, and submit it
-
Proceed to run manual exposure time as desired
\sa ExposureTime
Variants§
Auto = 0
The exposure time will be calculated automatically and set by the AE algorithm.
If ExposureTime is set while this mode is active, it will be ignored, and its value will not be retained.
When transitioning from Manual to Auto mode, the AEGC should start its adjustments based on the last set manual ExposureTime value.
Manual = 1
The exposure time will not be updated by the AE algorithm.
When transitioning from Auto to Manual mode, the last computed exposure value is used until a new value is specified through the ExposureTime control. If an ExposureTime value is specified in the same request where the ExposureTimeMode is changed from Auto to Manual, the provided ExposureTime is applied immediately.
Trait Implementations§
Source§impl Clone for ExposureTimeMode
impl Clone for ExposureTimeMode
Source§fn clone(&self) -> ExposureTimeMode
fn clone(&self) -> ExposureTimeMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more