Open eonadler opened 5 years ago
Jzazbz is designed to support HDR and wide-gamut colors. The [0, 255] × [0, 255] × [0, 255] sRGB space does not cover the domain of possible inputs.
Yes, JzAzBz is designed to support HDR and wide gamut. JzAzBz research came out of Dolby specifically for future standards for displays.
On Sun, Jan 12, 2020 at 4:37 PM Anders Kaseorg notifications@github.com wrote:
JzAzBz is designed to support HDR and wide-gamut colors. The [0, 255] × [0, 255] × [0, 255] sRGB space does not cover the domain of possible inputs.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/quag/JzAzBz/issues/1?email_source=notifications&email_token=AAAISDRCDYPFXIK6OIMWBIDQ5OZUVA5CNFSM4H7J5BP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIXI6EQ#issuecomment-573476626, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAISDW5XNK75B6SJYCNZQ3Q5OZUVANCNFSM4H7J5BPQ .
We have encountered the following issue, which has been reproduced using a few independent RGB --> JzAzBz implementations (including this and colorio) ---
The JzAzBz paper (https://www.osapublishing.org/DirectPDFAccess/77717F83-F893-C8C0-B2B48451182A4DFC_368272/oe-25-13-15131.pdf?da=1&id=368272&seq=0&mobile=no) seems to suggest that the coordinates should span roughly Jz in (0,1), Az in (-0.5, 0.5), Bz in (-0.5,0.5). However, when we explicitly map all RGB tuples in (0,255) x (0,255) x (0,255) to JzAzBz as follows, we find that (Jz, Az, Bz) span (0,0.167), (-0.09,1.09), (-0.156,0.115).
So we're wondering if the original paper renormalized their coordinates, or if there's a mistake on our end.
Extremely simplified code that demonstrates the basic issue:
import numpy as np
import colorio
jzazbz_test[i][j][k] = jzazbz_test = np.zeros((256,256,256,3))
for i in range(0,255):
for j in range(0,255):
for k in range(0,255):
jzazbz_test[i][j][k] = np.array(srgb255ToJzAzBz_(1.*i,1.*j,1.*k))
print('min Jz={}'.format(np.min(jzazbz_test[:,:,:,0])))
print('max Jz={}'.format(np.max(jzazbz_test[:,:,:,0])))
print('min Az={}'.format(np.min(jzazbz_test[:,:,:,1])))
print('max Az={}'.format(np.max(jzazbz_test[:,:,:,1])))
print('min Bz={}'.format(np.min(jzazbz_test[:,:,:,2])))
print('max Bz={}'.format(np.max(jzazbz_test[:,:,:,2])))