Ejemplo n.º 1
0
        public void Compute()
        {
            using (var refImage = Image("lenna.png"))
                using (var targetImage = new Mat())
                    using (var psnr = QualityMSE.Create(refImage))
                    {
                        Cv2.GaussianBlur(refImage, targetImage, new Size(5, 5), 15);

                        var value = psnr.Compute(targetImage);
                        Assert.Equal(83.89224, value[0], 6);
                        Assert.Equal(96.848604, value[1], 6);
                        Assert.Equal(50.611845, value[2], 6);
                    }
        }
Ejemplo n.º 2
0
        public void Compute()
        {
            using (var refImage = Image("lenna.png"))
                using (var targetImage = new Mat())
                    using (var psnr = QualityMSE.Create(refImage))
                    {
                        Cv2.GaussianBlur(refImage, targetImage, new Size(5, 5), 15);

                        var value = psnr.Compute(targetImage);
                        Assert.Equal(85.455929, value[0], 6);
                        Assert.Equal(99.077258, value[1], 6);
                        Assert.Equal(53.734322, value[2], 6);
                    }
        }