Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

range of JzAzBz coordinates #1

Open
eonadler opened this issue Jul 9, 2019 · 2 comments
Open

range of JzAzBz coordinates #1

eonadler opened this issue Jul 9, 2019 · 2 comments

Comments

@eonadler
Copy link

eonadler commented Jul 9, 2019

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])))

@andersk
Copy link

andersk commented Jan 13, 2020

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.

@quag
Copy link
Owner

quag commented Jan 16, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants