-
Hello, I have searched but not found a result, so I'm not sure if How can I create a 3D LUT .cube that executes a color space transform, for example from Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 21 replies
-
Hello, Yes this should be possible although this would be probably better expressed as a 2 1D LUTS + matrix but this should do: import colour
lut3D = colour.LUT3D(size=33)
lut3D.table = colour.gamma_function(lut3D.table, 2.6)
lut3D.table = colour.RGB_to_RGB(lut3D.table, "DCI-P3", "sRGB")
lut3D.table = colour.cctf_encoding(lut3D.table,"ITU-R BT.1886")
colour.write_LUT(lut3D, "my_lut.cube") |
Beta Was this translation helpful? Give feedback.
-
clipping before the 2nd encoding did help that the LUT now contains numbers. |
Beta Was this translation helpful? Give feedback.
-
it worked 👍 😄
yes, this is exactly what I did, but the projector is not very uniform in it's signal range. question: if I take a table of measurements, for example 9x9x9, is it possible to create a 3D LUT from the measurement data with the |
Beta Was this translation helpful? Give feedback.
-
Thanks for sharing, much appreciated! 🙏 Am I supplying the profile data incorrectly? |
Beta Was this translation helpful? Give feedback.
-
I assume by "interlaced" you mean the order of the patches? Here is the measurement data as csv file, arranged with blue fastest channel. |
Beta Was this translation helpful? Give feedback.
Conversion from DCI-P3 to sRGB must be done by using
colour.RGB_to_RGB(x, "DCI-P3", "sRGB")
not the reverse which maps from sRGB to DCI-P3.Then I'm assuming that you are going from a cinema-like display to HDTV one, hence the BT.1886 transfer function used which has a gamma of 2.4 and typically encodes sRGB/Rec.709 signals.
What do you mean by higher? Values going slightly over one? This is because of the whitepoint change, so depending your processing chain, you might need to either normalise the LUT or normalise post LUT application.