def test_quantize_fixpoint(self): q = haralick.quantize(gray, 4) self.assertTrue((q == gray4).all())
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())
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())