Enum HdrMode

Source
#[repr(i32)]
pub enum HdrMode { Off = 0, MultiExposureUnmerged = 1, MultiExposure = 2, SingleExposure = 3, Night = 4, }
Expand description

Set the mode to be used for High Dynamic Range (HDR) imaging.

HDR techniques typically include multiple exposure, image fusion and tone mapping techniques to improve the dynamic range of the resulting images.

When using an HDR mode, images are captured with different sets of AGC settings called HDR channels. Channels indicate in particular the type of exposure (short, medium or long) used to capture the raw image, before fusion. Each HDR image is tagged with the corresponding channel using the HdrChannel control.

\sa HdrChannel

Variants§

§

Off = 0

HDR is disabled.

Metadata for this frame will not include the HdrChannel control.

§

MultiExposureUnmerged = 1

Multiple exposures will be generated in an alternating fashion.

The multiple exposures will not be merged together and will be returned to the application as they are. Each image will be tagged with the correct HDR channel, indicating what kind of exposure it is. The tag should be the same as in the HdrModeMultiExposure case.

The expectation is that an application using this mode would merge the frames to create HDR images for itself if it requires them.

§

MultiExposure = 2

Multiple exposures will be generated and merged to create HDR images.

Each image will be tagged with the HDR channel (long, medium or short) that arrived and which caused this image to be output.

Systems that use two channels for HDR will return images tagged alternately as the short and long channel. Systems that use three channels for HDR will cycle through the short, medium and long channel before repeating.

§

SingleExposure = 3

Multiple frames all at a single exposure will be used to create HDR images.

These images should be reported as all corresponding to the HDR short channel.

§

Night = 4

Multiple frames will be combined to produce “night mode” images.

It is up to the implementation exactly which HDR channels it uses, and the images will all be tagged accordingly with the correct HDR channel information.

Trait Implementations§

Source§

impl Clone for HdrMode

Source§

fn clone(&self) -> HdrMode

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 HdrMode

Source§

const ID: u32 = 43u32

Source§

impl Debug for HdrMode

Source§

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

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

impl From<HdrMode> for ControlValue

Source§

fn from(val: HdrMode) -> Self

Converts to this type from the input type.
Source§

impl From<HdrMode> for i32

Source§

fn from(enum_value: HdrMode) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for HdrMode

Source§

fn eq(&self, other: &HdrMode) -> 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 HdrMode

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 HdrMode

Source§

type Error = TryFromPrimitiveError<HdrMode>

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 HdrMode

Source§

const NAME: &'static str = "HdrMode"

Source§

type Primitive = i32

Source§

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

Source§

impl Control for HdrMode

Source§

impl Copy for HdrMode

Source§

impl Eq for HdrMode

Source§

impl StructuralPartialEq for HdrMode

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.