pub struct Metering {
pub key: f64,
pub ev: f64,
}Expand description
What an averaging meter reads of a frame, and the offset that follows.
Fields§
§key: f64Mean luminance of the frame, in linear light.
Zero for a frame with no light at all, and for an empty one.
ev: f64Exposure offset in stops that puts key on mid grey.
Zero when the frame is already mid grey, and zero when it carries no light to meter: a black frame has no exposure to recover, so the meter says nothing rather than everything.
Implementations§
Source§impl Metering
impl Metering
Sourcepub fn of(pixels: &[[f64; 3]]) -> Self
pub fn of(pixels: &[[f64; 3]]) -> Self
Meter a row-major frame.
The mean is taken over every pixel and weighed by luminance. It is arithmetic in linear light, not in log: the average printer integrates transmittance, and a frame that is half black and half white integrates to 0.5, not to the geometric mean.
Trait Implementations§
impl Copy for Metering
impl StructuralPartialEq for Metering
Auto Trait Implementations§
impl Forget for Metering
impl Freeze for Metering
impl Move for Metering
impl RefUnwindSafe for Metering
impl Send for Metering
impl Sync for Metering
impl Unpin for Metering
impl UnsafeUnpin for Metering
impl UnwindSafe for Metering
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more