pub struct MetricResult {
pub dssim: Option<f64>,
pub ssimulacra2: Option<f64>,
pub butteraugli: Option<f64>,
pub psnr: Option<f64>,
}Expand description
Results from metric calculations.
Fields§
§dssim: Option<f64>DSSIM value (lower is better, 0 = identical).
ssimulacra2: Option<f64>SSIMULACRA2 score (higher is better, 100 = identical).
butteraugli: Option<f64>Butteraugli score (lower is better, <1.0 = imperceptible).
psnr: Option<f64>PSNR value in dB (higher is better). NOT RECOMMENDED.
Implementations§
Source§impl MetricResult
impl MetricResult
Sourcepub fn perception_level(&self) -> Option<PerceptionLevel>
pub fn perception_level(&self) -> Option<PerceptionLevel>
Get the perception level based on DSSIM value.
Sourcepub fn perception_level_ssimulacra2(&self) -> Option<PerceptionLevel>
pub fn perception_level_ssimulacra2(&self) -> Option<PerceptionLevel>
Get the perception level based on SSIMULACRA2 value.
Sourcepub fn perception_level_butteraugli(&self) -> Option<PerceptionLevel>
pub fn perception_level_butteraugli(&self) -> Option<PerceptionLevel>
Get the perception level based on Butteraugli value.
Trait Implementations§
Source§impl Clone for MetricResult
impl Clone for MetricResult
Source§fn clone(&self) -> MetricResult
fn clone(&self) -> MetricResult
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MetricResult
impl Debug for MetricResult
Source§impl Default for MetricResult
impl Default for MetricResult
Source§fn default() -> MetricResult
fn default() -> MetricResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MetricResult
impl<'de> Deserialize<'de> for MetricResult
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MetricResult
impl RefUnwindSafe for MetricResult
impl Send for MetricResult
impl Sync for MetricResult
impl Unpin for MetricResult
impl UnwindSafe for MetricResult
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