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
pnint
Properties
MaxPixelValue
get or set the maximum pixel value used for PSNR computation
public double MaxPixelValue { get; set; }
Property Value
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
refInputArraycmpInputArrayqualityMapOutputArrayoutput quality map, or null
maxPixelValuedoublemaximum 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
refInputArrayinput image to use as the source for comparison
maxPixelValuedoublemaximum per-channel value for any individual pixel; eg 255 for uint8 image
Returns
DisposeManaged()
Releases managed resources
protected override void DisposeManaged()