Closed
Description
We have encountered the following issue, which has been reproduced using a few independent RGB --> JzAzBz implementations (including colorio and https://github.com/quag/JzAzBz/blob/master/python3/srgb255ToJzAzBz.py) ---
The JzAzBz paper (https://doi.org/10.1364/OE.25.015131) 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
colorspace = colorio.SrgbLinear()
colorspace2 = colorio.JzAzBz()
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] = colorspace2.from_xyz100(colorspace.to_xyz100(colorspace.from_srgb1((i/255.,j/255.,k/255.))))
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])))
Metadata
Metadata
Assignees
Labels
No labels