pub struct PsnrMetric {
pub max_value: f32,
pub excellent_threshold: f32,
pub acceptable_threshold: f32,
}Expand description
Peak Signal-to-Noise Ratio metric
Fields§
§max_value: f32Maximum pixel value (255 for 8-bit)
excellent_threshold: f32Threshold for excellent quality (dB)
acceptable_threshold: f32Threshold for acceptable quality (dB)
Implementations§
Source§impl PsnrMetric
impl PsnrMetric
Sourcepub fn compare(&self, reference: &[Rgb], generated: &[Rgb]) -> PsnrResult
pub fn compare(&self, reference: &[Rgb], generated: &[Rgb]) -> PsnrResult
Compare two images
Trait Implementations§
Source§impl Clone for PsnrMetric
impl Clone for PsnrMetric
Source§fn clone(&self) -> PsnrMetric
fn clone(&self) -> PsnrMetric
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PsnrMetric
impl Debug for PsnrMetric
Auto Trait Implementations§
impl Freeze for PsnrMetric
impl RefUnwindSafe for PsnrMetric
impl Send for PsnrMetric
impl Sync for PsnrMetric
impl Unpin for PsnrMetric
impl UnsafeUnpin for PsnrMetric
impl UnwindSafe for PsnrMetric
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().