-
In the Annex 3 of Colour conversion from Recommendation ITU-R BT.709 to Recommendation ITU-R BT.2020, there is an example how you can convert the 10-bit RGB to xyY. How can I use the colour library to calculate the xyY value like the example? Quoted from the example:
I have followed the example as per @nick-shaw: It would be great if you can shed some light on this. Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @chesschi, You could compute them as follows, there is the hidden assumption which is that the values are encoded in legal range: import numpy as np
import colour
BT709 = colour.RGB_COLOURSPACES['ITU-R BT.709']
xyY = np.array([0.64, 0.33, 20]) / [1, 1, 100]
RGB = colour.XYZ_to_RGB(
colour.xyY_to_XYZ(xyY),
BT709.whitepoint,
BT709.whitepoint,
BT709.XYZ_to_RGB_matrix)
RGB_p = colour.oetf(RGB, method='ITU-R BT.709')
print(colour.full_to_legal(RGB_p, bit_depth=10, out_int=True))
# array([914, 64, 64]) I hope this helps! :) |
Beta Was this translation helpful? Give feedback.
-
Closing this one @chesschi, feel free to add any comments! |
Beta Was this translation helpful? Give feedback.
Hi @chesschi,
You could compute them as follows, there is the hidden assumption which is that the values are encoded in legal range:
I hope this helps! :)