Esempio n. 1
0
 def test_quantize_fixpoint(self):
     q = haralick.quantize(gray, 4)
     self.assertTrue((q == gray4).all())
Esempio n. 2
0
 def test_quantize_fixpoint(self):
     q = haralick.quantize(gray, 4)
     self.assertTrue((q == gray4).all())
Esempio n. 3
0
 def test_quantize(self):
     q = haralick.quantize(gray, 7)
     correct = np.array([[0,0,2,2],[0,0,2,2],[0,4,4,4],[4,4,6,6]],
                        dtype='i4')
     self.assertTrue((q == correct).all())
Esempio n. 4
0
 def test_quantize(self):
     q = haralick.quantize(gray, 7)
     correct = np.array(
         [[0, 0, 2, 2], [0, 0, 2, 2], [0, 4, 4, 4], [4, 4, 6, 6]],
         dtype="i4")
     self.assertTrue((q == correct).all())