Class QualityPSNR
Full reference peak signal to noise ratio (PSNR) algorithm https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
Implements
Inherited Members
Namespace: OpenCvSharp.Quality
Assembly: OpenCvSharp.dll
Syntax
public class QualityPSNR : QualityBase, ICvPtrHolder
Constructors
| Improve this Doc View SourceQualityPSNR(IntPtr)
Creates instance by raw pointer
Declaration
protected QualityPSNR(IntPtr p)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | p |
Properties
| Improve this Doc View SourceMaxPixelValue
get or set the maximum pixel value used for PSNR computation
Declaration
public double MaxPixelValue { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceCompute(InputArray, InputArray, OutputArray, Double)
static method for computing quality
Declaration
public static Scalar Compute(InputArray ref, InputArray cmp, OutputArray qualityMap, double maxPixelValue = 255)
Parameters
Type | Name | Description |
---|---|---|
InputArray | ref | |
InputArray | cmp | |
OutputArray | qualityMap | output quality map, or null |
System.Double | maxPixelValue | maximum per-channel value for any individual pixel; eg 255 for uint8 image |
Returns
Type | Description |
---|---|
OpenCvSharp.Scalar | PSNR value, or double.PositiveInfinity if the MSE between the two images == 0 |
Create(InputArray, Double)
Create an object which calculates quality
Declaration
public static QualityPSNR Create(InputArray ref, double maxPixelValue = 255)
Parameters
Type | Name | Description |
---|---|---|
InputArray | ref | input image to use as the source for comparison |
System.Double | maxPixelValue | maximum per-channel value for any individual pixel; eg 255 for uint8 image |
Returns
Type | Description |
---|---|
QualityPSNR |
DisposeManaged()
Releases managed resources
Declaration
protected override void DisposeManaged()