summaryrefslogtreecommitdiff
path: root/test_example.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-06-20 22:48:47 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-06-20 22:48:47 +0200
commit1934d1ce12200e26e9e76da9cd77b4593bc0a0c2 (patch)
treef397f8d0bd804f5df60424deb86374d27f7f059b /test_example.py
parent77221e174cdab64de60450646de77f849b043062 (diff)
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.
Diffstat (limited to 'test_example.py')
-rw-r--r--test_example.py3
1 files changed, 2 insertions, 1 deletions
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))