Replies: 2 comments 1 reply
-
Depends on what the RGB space is supposed to represent? RGB usually means it's some how display encoded (but not always) so you should pick an RGB model that matches your use case. Somewhere in Colour there is a long list of already implemented display models. On the other hand... I'm curious what your use case in HSL. If you are trying to perfrom perceptual image adjustments, you don't need to go to an RGB space yet. You can perform transforms / image tuning in an LCH representation of Lab directly. Or use an LCH model from something like CIECAM02 |
Beta Was this translation helpful? Give feedback.
-
As an important side note, the code I shared does not actually seem to work. I cannot get XYZ_to_RGB to work for the life of me! The values I am seeing right now for CIEXYZ are [ 0.07216608 0.04415477 0.03858796] which is pristine and accurate for CIELAB ([25, 35, 5]). Then the illuminant_XY (we are iterating through the illuminants, so for example, for illuminant A, this variable would hold [0.44758 0.40745]. illuminant_RGB/wt = [ 0.3127 0.329 ] for BT.2020. the NPM is: [[ 6.36958048e-01 1.44616904e-01 1.68880975e-01] then the inverse of that is (matrix XYZ to RGB): [[ 1.71665119 -0.35567078 -0.25336628] and the rgb_decoded is [ 0.15989773 0.07287098 -0.11008941]. No bueno. |
Beta Was this translation helpful? Give feedback.
-
What is the best choice of RGB color space in such a transform? CIE RGB? Rec.2020?
: )
J
Beta Was this translation helpful? Give feedback.
All reactions