예제 #1
0
 def test_gray(self):
     args = dict(GT=self.path('gry'),
                 P=self.path('gry'),
                 metric='ergas',
                 ws=4)
     ergas = sewar.cli(args)
     self.assertTrue(ergas == 0)
예제 #2
0
 def test_color(self):
     args = dict(GT=self.path('clr'),
                 P=self.path('clr'),
                 metric='ergas',
                 ws=16)
     ergas = sewar.cli(args)
     self.assertTrue(ergas == 0)
예제 #3
0
 def test_color(self):
     args = dict(GT=self.path('clr'),
                 P=self.path('clr'),
                 metric='scc',
                 ws=9,
                 win=[[-2, -2, -2], [-2, 16, -2], [-2, -2, -2]])
     scc = sewar.cli(args)
     self.assertTrue(scc == 1)
예제 #4
0
 def test_gray(self):
     args = dict(
         GT=self.path('gry'),
         P=self.path('gry_noise'),
         metric='psnrb',
     )
     psnrb = sewar.cli(args)
     self.assertTrue(abs(psnrb - 15.0646) < self.eps)
예제 #5
0
 def test_color(self):
     args = dict(GT=self.path('clr'),
                 P=self.path('clr'),
                 metric='ssim',
                 ws=9,
                 K1=0.02,
                 K2=0.05)
     ssim, _ = sewar.cli(args)
     self.assertTrue(ssim == 1)
예제 #6
0
 def test_color(self):
     args = dict(GT=self.path('clr'),
                 P=self.path('clr'),
                 metric='msssim',
                 weights=[0.0448, 0.1333],
                 ws=9,
                 K1=0.05,
                 K2=0.15)
     msssim = sewar.cli(args)
     self.assertTrue(msssim == 1)
예제 #7
0
 def test_color(self):
     args = dict(GT=self.path('clr'), P=self.path('clr'), metric='mse')
     mse = sewar.cli(args)
     self.assertTrue(mse == 0.0)
예제 #8
0
 def test_color_const(self):
     args = dict(GT=self.path('clr'),
                 P=self.path('clr_const'),
                 metric='mse')
     mse = sewar.cli(args)
     self.assertTrue(abs(mse - 2302.953958) < self.eps)
예제 #9
0
 def test_color_noise(self):
     args = dict(GT=self.path('clr'),
                 P=self.path('clr_noise'),
                 metric='mse')
     mse = sewar.cli(args)
     self.assertTrue(abs(mse - 2391.465875) < self.eps)
예제 #10
0
 def test_gray(self):
     args = dict(GT=self.path('gry'), P=self.path('gry'), metric='mse')
     mse = sewar.cli(args)
     self.assertTrue(mse == 0.0)