Trait QualityPSNRTrait

Source
pub trait QualityPSNRTrait: QualityBaseTrait + QualityPSNRTraitConst {
    // Required method
    fn as_raw_mut_QualityPSNR(&mut self) -> *mut c_void;

    // Provided methods
    fn compute(&mut self, cmp: &impl ToInputArray) -> Result<Scalar> { ... }
    fn clear(&mut self) -> Result<()> { ... }
    fn set_max_pixel_value(&mut self, val: f64) -> Result<()> { ... }
}
Expand description

Mutable methods for crate::quality::QualityPSNR

Required Methods§

Provided Methods§

Source

fn compute(&mut self, cmp: &impl ToInputArray) -> Result<Scalar>

Compute the PSNR

§Parameters
  • cmp: Comparison image
§Returns

Per-channel PSNR value, or std::numeric_limits::infinity() if the MSE between the two images == 0

Source

fn clear(&mut self) -> Result<()>

Implements Algorithm::clear()

Source

fn set_max_pixel_value(&mut self, val: f64) -> Result<()>

sets the maximum pixel value used for PSNR computation

§Parameters
  • val: Maximum pixel value

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§