pub fn peak_signal_to_noise_ratio<I, J, P>(original: &I, noisy: &J) -> f64
where
    I: GenericImageView<Pixel = P>,
    J: GenericImageView<Pixel = P>,
    P: Pixel,
    P::Subpixel: Into<f64> + Primitive,
{
    let max: f64 = <P::Subpixel as Bounded>::max_value().into();
    let mse = mean_squared_error(original, noisy);
    20f64 * max.log(10f64) - 10f64 * mse.log(10f64)
}
Returns the peak signal to noise ratio for a clean image and its noisy
approximation. All channels are considered equally. If you do not want this
(e.g. if using RGBA) then change image formats first.
See also [peak signal-to-noise ratio (wikipedia)](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio).
src/stats.rs