Enum ExposureTimeMode

Source
#[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.

  1. Start with ExposureTimeMode set to Auto

  2. Set ExposureTimeMode to Manual

  3. Wait for the first completed request that has ExposureTimeMode set to Manual

  4. Copy the value reported in ExposureTime into a new request, and submit it

  5. 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

Source§

fn clone(&self) -> ExposureTimeMode

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ControlEntry for ExposureTimeMode

Source§

const ID: u32 = 8u32

Source§

impl Debug for ExposureTimeMode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ExposureTimeMode> for ControlValue

Source§

fn from(val: ExposureTimeMode) -> Self

Converts to this type from the input type.
Source§

impl From<ExposureTimeMode> for i32

Source§

fn from(enum_value: ExposureTimeMode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ExposureTimeMode

Source§

fn eq(&self, other: &ExposureTimeMode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl TryFrom<ControlValue> for ExposureTimeMode

Source§

type Error = ControlValueError

The type returned in the event of a conversion error.
Source§

fn try_from(value: ControlValue) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i32> for ExposureTimeMode

Source§

type Error = TryFromPrimitiveError<ExposureTimeMode>

The type returned in the event of a conversion error.
Source§

fn try_from(number: i32) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for ExposureTimeMode

Source§

const NAME: &'static str = "ExposureTimeMode"

Source§

type Primitive = i32

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Control for ExposureTimeMode

Source§

impl Copy for ExposureTimeMode

Source§

impl Eq for ExposureTimeMode

Source§

impl StructuralPartialEq for ExposureTimeMode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynControlEntry for T
where T: ControlEntry,

Source§

fn id(&self) -> u32

Source§

fn value(&self) -> ControlValue

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.