[][src]Trait opencv::prelude::QualityPSNRTrait

pub trait QualityPSNRTrait: QualityBase {
    fn as_raw_QualityPSNR(&self) -> *const c_void;
fn as_raw_mut_QualityPSNR(&mut self) -> *mut c_void; fn compute(&mut self, cmp: &dyn ToInputArray) -> Result<Scalar> { ... }
fn empty(&self) -> Result<bool> { ... }
fn clear(&mut self) -> Result<()> { ... }
fn get_max_pixel_value(&self) -> Result<f64> { ... }
fn set_max_pixel_value(&mut self, val: f64) -> Result<()> { ... } }

Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio

Required methods

Loading content...

Provided methods

fn compute(&mut self, cmp: &dyn 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

fn empty(&self) -> Result<bool>

Implements Algorithm::empty()

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

Implements Algorithm::clear()

fn get_max_pixel_value(&self) -> Result<f64>

return the maximum pixel value used for PSNR computation

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

sets the maximum pixel value used for PSNR computation

Parameters

  • val: Maximum pixel value
Loading content...

Implementors

Loading content...