From 1934d1ce12200e26e9e76da9cd77b4593bc0a0c2 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sat, 20 Jun 2020 22:48:47 +0200 Subject: Rewrite the error function w/ analytic derivatives This greatly speeds up the code and improves convergence. Something's slightly off with the code, though, and the output colors are slightly skewed. --- test_example.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test_example.py') diff --git a/test_example.py b/test_example.py index 6be982d..80b07c7 100644 --- a/test_example.py +++ b/test_example.py @@ -13,7 +13,8 @@ cc_ref = np.array([ 18.70184886, -13.19804478, 2.12180137]) if __name__ == "__main__": - XYZ = sRGB_to_XYZ(eotf_inverse_sRGB(RGB_ref), D65_xy) + #XYZ = sRGB_to_XYZ(eotf_inverse_sRGB(RGB_ref), D65_xy) + XYZ = np.array([1/3, 1/4, 1/3]) Lab = XYZ_to_Lab(XYZ, D65_xy) print("Target: X=%g, Y=%g, Z=%g, L=%g, a=%g, b=%g" % (*XYZ, *Lab)) -- cgit