colour.oetf¶
-
colour.
oetf
(value, function='sRGB', **kwargs)[source]¶ Encodes estimated tristimulus values in a scene to \(R'G'B'\) video component signal value using given opto-electronic transfer function (OETF / OECF).
Parameters: - value (numeric or array_like) – Value.
- function (unicode, optional) – {‘sRGB’, ‘ARIB STD-B67’, ‘DICOM GSDF’, ‘ITU-R BT.2020’, ‘ITU-R BT.2100 HLG’, ‘ITU-R BT.2100 PQ’, ‘ITU-R BT.601’, ‘ITU-R BT.709’, ‘ProPhoto RGB’, ‘RIMM RGB’, ‘ROMM RGB’, ‘SMPTE 240M’, ‘ST 2084’}, Opto-electronic transfer function (OETF / OECF).
Other Parameters: - E_clip (numeric, optional) – {
colour.models.oetf_RIMMRGB()
}, Maximum exposure level. - I_max (numeric, optional) – {
colour.models.oetf_ROMMRGB()
,colour.models.oetf_RIMMRGB()
}, Maximum code value: 255, 4095 and 650535 for respectively 8-bit, 12-bit and 16-bit per channel. - L_p (numeric, optional) – {
colour.models.oetf_ST2084()
}, Display peak luminance \(cd/m^2\). - is_12_bits_system (bool) – {
colour.models.oetf_BT2020()
}, ITU-R BT.2020 alpha and beta constants are used if system is not 12-bit. - r (numeric, optional) – {
colour.models.oetf_ARIBSTDB67()
}, Video level corresponding to reference white level.
Returns: \(R'G'B'\) video component signal value.
Return type: numeric or ndarray
Examples
>>> oetf(0.18) # doctest: +ELLIPSIS 0.4613561... >>> oetf(0.18, function='ITU-R BT.2020') # doctest: +ELLIPSIS 0.4090077... >>> oetf(0.18, function='ST 2084', L_p=1000) ... # doctest: +ELLIPSIS 0.1820115...