Table of Contents

Class QualityPSNR

Namespace
OpenCvSharp.Quality
Assembly
OpenCvSharp.dll

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

public class QualityPSNR : QualityBase, IDisposable, ICvPtrHolder
Inheritance
QualityPSNR
Implements
Inherited Members

Constructors

QualityPSNR(nint)

Creates instance by raw pointer

protected QualityPSNR(nint p)

Parameters

p nint

Properties

MaxPixelValue

get or set the maximum pixel value used for PSNR computation

public double MaxPixelValue { get; set; }

Property Value

double

Methods

Compute(InputArray, InputArray, OutputArray?, double)

static method for computing quality

public static Scalar Compute(InputArray @ref, InputArray cmp, OutputArray? qualityMap, double maxPixelValue = 255)

Parameters

ref InputArray
cmp InputArray
qualityMap OutputArray

output quality map, or null

maxPixelValue double

maximum per-channel value for any individual pixel; eg 255 for uint8 image

Returns

Scalar

PSNR value, or double.PositiveInfinity if the MSE between the two images == 0

Create(InputArray, double)

Create an object which calculates quality

public static QualityPSNR Create(InputArray @ref, double maxPixelValue = 255)

Parameters

ref InputArray

input image to use as the source for comparison

maxPixelValue double

maximum per-channel value for any individual pixel; eg 255 for uint8 image

Returns

QualityPSNR

DisposeManaged()

Releases managed resources

protected override void DisposeManaged()