Пример #1
0
 def test_rgb_lch_roundtrip(self):
     rgb = img_as_float(self.img_rgb)
     lab = rgb2lab(rgb)
     lch = lab2lch(lab)
     lab2 = lch2lab(lch)
     rgb2 = lab2rgb(lab2)
     assert_array_almost_equal(rgb, rgb2)
Пример #2
0
 def test_lab_lch_3d(self):
     lab0 = self._get_lab0()
     lch0 = lab2lch(lab0)
     lch3 = lab2lch(lab0[None, None, None, :])
     assert_array_almost_equal(lch0, lch3[0, 0, 0, :])
Пример #3
0
 def test_lab_lch_roundtrip(self):
     rgb = img_as_float(self.img_rgb)
     lab = rgb2lab(rgb)
     lab2 = lch2lab(lab2lch(lab))
     assert_array_almost_equal(lab2, lab)