public void PropertyMaxPixelValue() { using (var refImage = Image("lenna.png")) using (var psnr = QualityPSNR.Create(refImage)) { const double value = 123.456; psnr.MaxPixelValue = value; Assert.Equal(value, psnr.MaxPixelValue, 6); } }
public void Compute() { using (var refImage = Image("lenna.png")) using (var targetImage = new Mat()) using (var psnr = QualityPSNR.Create(refImage)) { Cv2.GaussianBlur(refImage, targetImage, new Size(5, 5), 15); var value = psnr.Compute(targetImage); Assert.Equal(28.813382, value[0], 6); Assert.Equal(28.171064, value[1], 6); Assert.Equal(30.828286, value[2], 6); } }