PSNR function

double PSNR(
  1. InputArray src1,
  2. InputArray src2, {
  3. double R = 255.0,
})

Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.

https://docs.opencv.org/4.x/d2/de8/group__core__array.html#ga3119e3ea73010a6f810bb05aa36ac8d6

Implementation

double PSNR(InputArray src1, InputArray src2, {double R = 255.0}) {
  final p = calloc<ffi.Double>();
  cvRun(() => ccore.cv_PSNR(src1.ref, src2.ref, R, p, ffi.nullptr));
  final rval = p.value;
  calloc.free(p);
  return rval;
}