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:
 
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...