colour.models.rgb.transfer_functions Package

Module Contents

colour.models.rgb.transfer_functions.log_encoding_ACESproxy(ACESproxy_l, bit_depth=u'10 Bit')[source]

Defines the ACESproxy colourspace log encoding curve / opto-electronic transfer function.

Parameters:
  • ACESproxy_l (numeric or array_like) – ACESproxyLin linear value.
  • bit_depth (unicode, optional) – {‘10 Bit’, ‘12 Bit’}, ACESproxy bit depth.
Returns:

ACESproxy non-linear value.

Return type:

numeric or ndarray

Examples

>>> log_encoding_ACESproxy(0.18)
426
colour.models.rgb.transfer_functions.log_decoding_ACESproxy(ACESproxy, bit_depth=u'10 Bit')[source]

Defines the ACESproxy colourspace log decoding curve / electro-optical transfer function.

Parameters:
  • ACESproxy (numeric or array_like) – ACESproxy non-linear value.
  • bit_depth (unicode, optional) – {‘10 Bit’, ‘12 Bit’}, ACESproxy bit depth.
Returns:

ACESproxyLin linear value.

Return type:

numeric or ndarray

Examples

>>> log_decoding_ACESproxy(426)  
0.1792444...
colour.models.rgb.transfer_functions.log_encoding_ACEScc(ACEScc_l)[source]

Defines the ACEScc colourspace log encoding / opto-electronic transfer function.

Parameters:ACEScc_l (numeric or array_like) – ACESccLin linear value.
Returns:ACEScc non-linear value.
Return type:numeric or ndarray

Examples

>>> log_encoding_ACEScc(0.18)  
0.4135884...
colour.models.rgb.transfer_functions.log_decoding_ACEScc(ACEScc)[source]

Defines the ACEScc colourspace log decoding / electro-optical transfer function.

Parameters:ACEScc (numeric or array_like) – ACEScc non-linear value.
Returns:ACESccLin linear value.
Return type:numeric or ndarray

Examples

>>> log_decoding_ACEScc(0.413588402492442)  
0.1799999...
colour.models.rgb.transfer_functions.log_encoding_ALEXALogC(x, firmware=u'SUP 3.x', method=u'Linear Scene Exposure Factor', EI=800)[source]

Defines the ALEXA Log C log encoding curve / opto-electronic transfer function.

Parameters:
  • x (numeric or array_like) – Linear data \(x\).
  • firmware (unicode, optional) – {‘SUP 3.x’, ‘SUP 2.x’}, Alexa firmware version.
  • method (unicode, optional) – {‘Linear Scene Exposure Factor’, ‘Normalised Sensor Signal’}, Conversion method.
  • EI (int, optional) – Ei.
Returns:

ALEXA Log C encoded data \(t\).

Return type:

numeric or ndarray

Examples

>>> log_encoding_ALEXALogC(0.18)  
0.3910068...
colour.models.rgb.transfer_functions.log_decoding_ALEXALogC(t, firmware=u'SUP 3.x', method=u'Linear Scene Exposure Factor', EI=800)[source]

Defines the ALEXA Log C log decoding curve / electro-optical transfer function.

Parameters:
  • t (numeric or array_like) – ALEXA Log C encoded data \(t\).
  • firmware (unicode, optional) – {‘SUP 3.x’, ‘SUP 2.x’}, Alexa firmware version.
  • method (unicode, optional) – {‘Linear Scene Exposure Factor’, ‘Normalised Sensor Signal’}, Conversion method.
  • EI (int, optional) – Ei.
Returns:

Linear data \(x\).

Return type:

numeric or ndarray

Examples

>>> log_decoding_ALEXALogC(0.391006832034084)  
0.18...
colour.models.rgb.transfer_functions.oetf_BT709(L)[source]

Defines Recommendation ITU-R BT.709-6 opto-electronic transfer function (OETF / OECF).

Parameters:L (numeric or array_like) – Luminance \(L\) of the image.
Returns:Corresponding electrical signal \(V\).
Return type:numeric or ndarray

Examples

>>> oetf_BT709(0.18)  
0.4090077...
colour.models.rgb.transfer_functions.eotf_BT709(V)[source]

Defines Recommendation ITU-R BT.709-6 electro-optical transfer function (EOTF / EOCF).

Parameters:V (numeric or array_like) – Electrical signal \(V\).
Returns:Corresponding luminance \(L\) of the image.
Return type:numeric or ndarray

Warning

Recommendation ITU-R BT.709-6 doesn’t specify an electro-optical transfer function. This definition is used for symmetry in unit tests and other computations but should not be used as an EOTF.

Examples

>>> eotf_BT709(0.409007728864150)  
0.1...
colour.models.rgb.transfer_functions.oetf_BT1886(L, L_B=64, L_W=940)[source]

Defines Recommendation ITU-R BT.1886 opto-electrical transfer function (OETF / OECF).

Parameters:
  • L (numeric or array_like) – Screen luminance in \(cd/m^2\).
  • L_B (numeric, optional) – Screen luminance for black.
  • L_W (numeric, optional) – Screen luminance for white.
Returns:

Input video signal level (normalized, black at \(V = 0\), to white at \(V = 1\).

Return type:

numeric or ndarray

Warning

Recommendation ITU-R BT.1886 doesn’t specify an opto-electrical transfer function. This definition is used for symmetry in unit tests and other computations but should not be used as an OETF.

Examples

>>> oetf_BT1886(277.98159179331145)  
0.4090077...
colour.models.rgb.transfer_functions.eotf_BT1886(V, L_B=64, L_W=940)[source]

Defines Recommendation ITU-R BT.1886 electro-optical transfer function (EOTF / EOCF).

Parameters:
  • V (numeric or array_like) – Input video signal level (normalized, black at \(V = 0\), to white at \(V = 1\). For content mastered per Recommendation ITU-R BT.709, 10-bit digital code values \(D\) map into values of \(V\) per the following equation: \(V = (D–64)/876\)
  • L_B (numeric, optional) – Screen luminance for black.
  • L_W (numeric, optional) – Screen luminance for white.
Returns:

Screen luminance in \(cd/m^2\).

Return type:

numeric or ndarray

Examples

>>> eotf_BT1886(0.409007728864150)  
277.9815917...
colour.models.rgb.transfer_functions.oetf_BT2020(E, is_12_bits_system=False)[source]

Defines Recommendation ITU-R BT.2020 opto-electrical transfer function (OETF / OECF).

Parameters:
  • E (numeric or array_like) – Voltage \(E\) normalized by the reference white level and proportional to the implicit light intensity that would be detected with a reference camera colour channel R, G, B.
  • is_12_bits_system (bool) – BT.709 alpha and beta constants are used if system is not 12-bit.
Returns:

Resulting non-linear signal \(E'\).

Return type:

numeric or ndarray

Examples

>>> oetf_BT2020(0.18)  
0.4090077...
colour.models.rgb.transfer_functions.eotf_BT2020(E_p, is_12_bits_system=False)[source]

Defines Recommendation ITU-R BT.2020 electro-optical transfer function (EOTF / EOCF).

Parameters:
  • E_p (numeric or array_like) – Non-linear signal \(E'\).
  • is_12_bits_system (bool) – BT.709 alpha and beta constants are used if system is not 12-bit.
Returns:

Resulting voltage \(E\).

Return type:

numeric or ndarray

Examples

>>> eotf_BT2020(0.705515089922121)  
0.4999999...
colour.models.rgb.transfer_functions.log_encoding_CanonLog(x)[source]

Defines the Canon Log log encoding curve / opto-electronic transfer function.

Parameters:x (numeric or array_like) – Linear data \(x\).
Returns:Non-linear data \(y\).
Return type:numeric or ndarray

Examples

>>> log_encoding_CanonLog(0.20) * 100  
32.7953896...
colour.models.rgb.transfer_functions.log_decoding_CanonLog(y)[source]

Defines the Canon Log log decoding curve / electro-optical transfer function.

Parameters:y (numeric or array_like) – Non-linear data \(y\).
Returns:Linear data \(x\).
Return type:numeric or ndarray

Examples

>>> log_decoding_CanonLog(32.795389693580908 / 100)  
0.19999999...
colour.models.rgb.transfer_functions.log_encoding_Cineon(x, black_offset=0.0107977516232771)[source]

Defines the Cineon log encoding curve / opto-electronic transfer function.

Parameters:
  • x (numeric or array_like) – Linear data \(x\).
  • black_offset (numeric or array_like) – Black offset.
Returns:

Non-linear data \(y\).

Return type:

numeric or ndarray

Examples

>>> log_encoding_Cineon(0.18)  
0.4573196...
colour.models.rgb.transfer_functions.log_decoding_Cineon(y, black_offset=0.0107977516232771)[source]

Defines the Cineon log decoding curve / electro-optical transfer function.

Parameters:
  • y (numeric or array_like) – Non-linear data \(y\).
  • black_offset (numeric or array_like) – Black offset.
Returns:

Linear data \(x\).

Return type:

numeric or ndarray

Examples

>>> log_decoding_Cineon(0.457319613085418)  
0.1799999...
colour.models.rgb.transfer_functions.oetf_DCIP3(XYZ)[source]

Defines the DCI-P3 colourspace opto-electronic transfer function (OETF / OECF).

Parameters:XYZ (numeric or array_like) – CIE XYZ tristimulus values.
Returns:Non-linear CIE XYZ’ tristimulus values.
Return type:numeric or ndarray

Examples

>>> oetf_DCIP3(0.18)  
461.9922059...
colour.models.rgb.transfer_functions.eotf_DCIP3(XYZ_p)[source]

Defines the DCI-P3 colourspace electro-optical transfer function (EOTF / EOCF).

Parameters:XYZ_p (numeric or array_like) – Non-linear CIE XYZ’ tristimulus values.
Returns:CIE XYZ tristimulus values.
Return type:numeric or ndarray

Examples

>>> eotf_DCIP3(461.99220597484737)  
0.18...
colour.models.rgb.transfer_functions.gamma_function(a, exponent=1.0)[source]

Defines a typical gamma encoding / decoding function.

Parameters:
  • a (numeric or array_like) – Array to encode / decode.
  • exponent (numeric, optional) – Encoding / decoding exponent.
Returns:

Encoded / decoded array.

Return type:

numeric or ndarray

Examples

>>> gamma_function(0.18, 2.2)  
0.0229932...
colour.models.rgb.transfer_functions.linear_function(a)[source]

Defines a typical linear encoding / decoding function, essentially a pass-through function.

Parameters:a (numeric or array_like) – Array to encode / decode.
Returns:Encoded / decoded array.
Return type:numeric or ndarray

Examples

>>> linear_function(0.18)
0.18
colour.models.rgb.transfer_functions.log_encoding_Panalog(x, black_offset=0.04077184461038074)[source]

Defines the Panalog log encoding curve / opto-electronic transfer function.

Parameters:
  • x (numeric or array_like) – Linear data \(x\).
  • black_offset (numeric or array_like) – Black offset.
Returns:

Non-linear data \(y\).

Return type:

numeric or ndarray

Warning

These are estimations known to be close enough, the actual log encoding curves are not published.

Examples

>>> log_encoding_Panalog(0.18)  
0.3745767...
colour.models.rgb.transfer_functions.log_decoding_Panalog(y, black_offset=0.04077184461038074)[source]

Defines the Panalog log decoding curve / electro-optical transfer function.

Parameters:
  • y (numeric or array_like) – Non-linear data \(y\).
  • black_offset (numeric or array_like) – Black offset.
Returns:

Linear data \(x\).

Return type:

numeric or ndarray

Warning

These are estimations known to be close enough, the actual log encoding curves are not published.

Examples

>>> log_decoding_Panalog(0.374576791382298)  
0.1...
colour.models.rgb.transfer_functions.log_encoding_VLog(L_in)[source]

Defines the Panasonic V-Log log encoding curve / opto-electronic transfer function.

Parameters:L_in (numeric or array_like) – Linear reflection data :math`L_{in}`.
Returns:Non-linear data \(V_{out}\).
Return type:numeric or ndarray

Examples

>>> log_encoding_VLog(0.18)  
0.4233114...
colour.models.rgb.transfer_functions.log_decoding_VLog(V_out)[source]

Defines the Panasonic V-Log log decoding curve / electro-optical transfer function.

Parameters:V_out (numeric or array_like) – Non-linear data \(V_{out}\).
Returns:Linear reflection data :math`L_{in}`.
Return type:numeric or ndarray

Examples

>>> log_decoding_VLog(0.423311448760136)  
0.1799999...
colour.models.rgb.transfer_functions.log_encoding_PivotedLog(x, log_reference=445, linear_reference=0.18, negative_gamma=0.6, density_per_code_value=0.002)[source]

Defines the Josh Pines style Pivoted Log log encoding curve / opto-electronic transfer function.

Parameters:
  • x (numeric or array_like) – Linear data \(x\).
  • log_reference (numeric or array_like) – Log reference.
  • linear_reference (numeric or array_like) – Linear reference.
  • negative_gamma (numeric or array_like) – Negative gamma.
  • density_per_code_value (numeric or array_like) – Density per code value.
Returns:

Non-linear data \(y\).

Return type:

numeric or ndarray

Examples

>>> log_encoding_PivotedLog(0.18)  
0.4349951...
colour.models.rgb.transfer_functions.log_decoding_PivotedLog(y, log_reference=445, linear_reference=0.18, negative_gamma=0.6, density_per_code_value=0.002)[source]

Defines the Josh Pines style Pivoted Log log decoding curve / electro-optical transfer function.

Parameters:
  • y (numeric or array_like) – Non-linear data \(y\).
  • log_reference (numeric or array_like) – Log reference.
  • linear_reference (numeric or array_like) – Linear reference.
  • negative_gamma (numeric or array_like) – Negative gamma.
  • density_per_code_value (numeric or array_like) – Density per code value.
Returns:

Linear data \(x\).

Return type:

numeric or ndarray

Examples

>>> log_decoding_PivotedLog(0.434995112414467)  
0.1...
colour.models.rgb.transfer_functions.log_encoding_REDLog(x, black_offset=0.009955040995908344)[source]

Defines the REDLog log encoding curve / opto-electronic transfer function.

Parameters:
  • x (numeric or array_like) – Linear data \(x\).
  • black_offset (numeric or array_like) – Black offset.
Returns:

Non-linear data \(y\).

Return type:

numeric or ndarray

Examples

>>> log_encoding_REDLog(0.18)  
0.6376218...
colour.models.rgb.transfer_functions.log_decoding_REDLog(y, black_offset=0.009955040995908344)[source]

Defines the REDLog log decoding curve / electro-optical transfer function.

Parameters:
  • y (numeric or array_like) – Non-linear data \(y\).
  • black_offset (numeric or array_like) – Black offset.
Returns:

Linear data \(x\).

Return type:

numeric or ndarray

Examples

>>> log_decoding_REDLog(0.637621845988175)  
0.1...
colour.models.rgb.transfer_functions.oetf_ROMMRGB(X)[source]

Defines the ROMM RGB encoding opto-electronic transfer function (OETF / OECF).

Parameters:X (numeric or array_like) – Linear data \(X_{ROMM}\).
Returns:Non-linear data \(X'_{ROMM}\).
Return type:numeric or ndarray

Examples

>>> oetf_ROMMRGB(0.18)  
0.3857114...
colour.models.rgb.transfer_functions.eotf_ROMMRGB(X_p)[source]

Defines the ROMM RGB encoding electro-optical transfer function (EOTF / EOCF).

Parameters:X_p (numeric or array_like) – Non-linear data \(X'_{ROMM}\).
Returns:Linear data \(X_{ROMM}\).
Return type:numeric or ndarray

Examples

>>> eotf_ROMMRGB(0.3857114247511376) 
0.1...
colour.models.rgb.transfer_functions.oetf_ProPhotoRGB(X)

Defines the ROMM RGB encoding opto-electronic transfer function (OETF / OECF).

Parameters:X (numeric or array_like) – Linear data \(X_{ROMM}\).
Returns:Non-linear data \(X'_{ROMM}\).
Return type:numeric or ndarray

Examples

>>> oetf_ROMMRGB(0.18)  
0.3857114...
colour.models.rgb.transfer_functions.eotf_ProPhotoRGB(X_p)

Defines the ROMM RGB encoding electro-optical transfer function (EOTF / EOCF).

Parameters:X_p (numeric or array_like) – Non-linear data \(X'_{ROMM}\).
Returns:Linear data \(X_{ROMM}\).
Return type:numeric or ndarray

Examples

>>> eotf_ROMMRGB(0.3857114247511376) 
0.1...
colour.models.rgb.transfer_functions.oetf_RIMMRGB(X, I_max=255, E_clip=2.0)[source]

Defines the RIMM RGB encoding opto-electronic transfer function (OETF / OECF).

RIMM RGB encoding non-linearity is based on that specified by Recommendation ITU-R BT.709-6.

Parameters:
  • X (numeric or array_like) – Linear data \(X_{RIMM}\).
  • I_max (numeric, optional) – Maximum code value: 255, 4095, and 650535 for respectively 8-bit, 12-bit and 16-bit per channel.
  • E_clip (numeric, optional) – Maximum exposure level.
Returns:

Non-linear data \(X'_{RIMM}\).

Return type:

numeric or ndarray

Examples

>>> oetf_RIMMRGB(0.18)  
74.3768017...
colour.models.rgb.transfer_functions.eotf_RIMMRGB(X_p, I_max=255, E_clip=2.0)[source]

Defines the RIMM RGB encoding electro-optical transfer function (EOTF / EOCF).

Parameters:
  • X_p (numeric or array_like) – Non-linear data \(X'_{RIMM}\).
  • I_max (numeric, optional) – Maximum code value: 255, 4095, and 650535 for respectively 8-bit, 12-bit and 16-bit per channel.
  • E_clip (numeric, optional) – Maximum exposure level.
Returns:

Linear data \(X_{RIMM}\).

Return type:

numeric or ndarray

Examples

>>> eotf_RIMMRGB(74.37680178131521)  
0.1...
colour.models.rgb.transfer_functions.log_encoding_ERIMMRGB(X, I_max=255, E_min=0.001, E_clip=316.2)[source]

Defines the ERIMM RGB log encoding curve / opto-electronic transfer function (OETF / OECF).

Parameters:
  • X (numeric or array_like) – Linear data \(X_{ERIMM}\).
  • I_max (numeric, optional) – Maximum code value: 255, 4095, and 650535 for respectively 8-bit, 12-bit and 16-bit per channel.
  • E_min (numeric, optional) – Minimum exposure limit.
  • E_clip (numeric, optional) – Maximum exposure limit.
Returns:

Non-linear data \(X'_{ERIMM}\).

Return type:

numeric or ndarray

Examples

>>> log_encoding_ERIMMRGB(0.18)  
104.5633593...
colour.models.rgb.transfer_functions.log_decoding_ERIMMRGB(X_p, I_max=255, E_min=0.001, E_clip=316.2)[source]

Defines the ERIMM RGB log decoding curve / electro-optical transfer function (EOTF / EOCF).

Parameters:
  • X_p (numeric or array_like) – Non-linear data \(X'_{ERIMM}\).
  • I_max (numeric, optional) – Maximum code value: 255, 4095, and 650535 for respectively 8-bit, 12-bit and 16-bit per channel.
  • E_min (numeric, optional) – Minimum exposure limit.
  • E_clip (numeric, optional) – Maximum exposure limit.
Returns:

Linear data \(X_{ERIMM}\).

Return type:

numeric or ndarray

Examples

>>> log_decoding_ERIMMRGB(104.56335932049294) 
0.1...
colour.models.rgb.transfer_functions.log_encoding_SLog(t)[source]

Defines the Sony S-Log log encoding curve / opto-electronic transfer function.

Parameters:t (numeric or array_like) – Input light level \(t\) to a camera.
Returns:Camera output code \(y\).
Return type:numeric or ndarray

Examples

>>> log_encoding_SLog(0.18)  
0.3599878...
colour.models.rgb.transfer_functions.log_decoding_SLog(y)[source]

Defines the Sony S-Log log decoding curve / electro-optical transfer function.

Parameters:y (numeric or array_like) – Camera output code \(y\).
Returns:Input light level \(t\) to a camera.
Return type:numeric or ndarray

Examples

>>> log_decoding_SLog(0.359987846422154)  
0.1...
colour.models.rgb.transfer_functions.log_encoding_SLog2(t)[source]

Defines the Sony S-Log2 log encoding curve / opto-electronic transfer function.

Parameters:t (numeric or array_like) – Input light level \(t\) to a camera.
Returns:Camera output code \(y\).
Return type:numeric or ndarray

Examples

>>> log_encoding_SLog2(0.18)  
0.3849708...
colour.models.rgb.transfer_functions.log_decoding_SLog2(y)[source]

Defines the Sony S-Log2 log decoding curve / electro-optical transfer function.

Parameters:y (numeric or array_like) – Camera output code \(y\).
Returns:Input light level \(t\) to a camera.
Return type:numeric or ndarray

Examples

>>> log_decoding_SLog2(0.384970815928670)  
0.1...
colour.models.rgb.transfer_functions.log_encoding_SLog3(t)[source]

Defines the Sony S-Log3 log encoding curve / opto-electronic transfer function.

Parameters:t (numeric or array_like) – Input light level \(t\) to a camera.
Returns:Camera output code \(y\).
Return type:numeric or ndarray

Examples

>>> log_encoding_SLog3(0.18)  
0.4105571...
colour.models.rgb.transfer_functions.log_decoding_SLog3(y)[source]

Defines the Sony S-Log3 log decoding curve / electro-optical transfer function.

Parameters:y (numeric or array_like) – Camera output code \(y\).
Returns:Input light level \(t\) to a camera.
Return type:numeric or ndarray

Examples

>>> log_decoding_SLog3(0.410557184750733)  
0.1...
colour.models.rgb.transfer_functions.oetf_sRGB(L)[source]

Defines the sRGB colourspace opto-electronic transfer function (OETF / OECF).

Parameters:L (numeric or array_like) – Luminance \(L\) of the image.
Returns:Corresponding electrical signal \(V\).
Return type:numeric or ndarray

Examples

>>> oetf_sRGB(0.18)  
0.4613561...
colour.models.rgb.transfer_functions.eotf_sRGB(V)[source]

Defines the sRGB colourspace electro-optical transfer function (EOTF / EOCF).

Parameters:V (numeric or array_like) – Electrical signal \(V\)..
Returns:Corresponding luminance \(L\) of the image.
Return type:numeric or ndarray

Examples

>>> eotf_sRGB(0.461356129500442)  
0.1...
colour.models.rgb.transfer_functions.oetf_ST2084(C, L_p=10000)[source]

Defines SMPTE ST 2084:2014 optimised perceptual opto-electronic transfer function (OETF / OECF).

Parameters:
  • C (numeric or array_like) – Target optical output \(C\) in \(cd/m^2\) of the ideal reference display.
  • L_p (numeric, optional) – Display peak luminance \(cd/m^2\).
Returns:

Color value abbreviated as \(N\), normalized to the range [0, 1], that is directly proportional to the encoded signal representation, and which is not directly proportional to the optical output of a display device.

Return type:

numeric or ndarray

Examples

>>> oetf_ST2084(0.18)  
0.0794209...
colour.models.rgb.transfer_functions.eotf_ST2084(N, L_p=10000)[source]

Defines SMPTE ST 2084:2014 optimised perceptual electro-optical transfer function (EOTF / EOCF).

This perceptual quantizer (PQ) has been modeled by Dolby Laboratories using Barten (1999) contrast sensitivity function.

Parameters:
  • N (numeric or array_like) – Color value abbreviated as \(N\), normalized to the range [0, 1], that is directly proportional to the encoded signal representation, and which is not directly proportional to the optical output of a display device.
  • L_p (numeric, optional) – Display peak luminance \(cd/m^2\).
Returns:

Target optical output \(C\) in \(cd/m^2\) of the ideal reference display.

Return type:

numeric or ndarray

Examples

>>> eotf_ST2084(0.079420969944927)  
0.1...
colour.models.rgb.transfer_functions.log_decoding_ViperLog(y)[source]

Defines the Viper Log log decoding curve / electro-optical transfer function.

Parameters:y (numeric or array_like) – Non-linear data \(y\).
Returns:Linear data \(x\).
Return type:numeric or ndarray

Examples

>>> log_decoding_ViperLog(0.636008067010413)  
0.1799999...
colour.models.rgb.transfer_functions.log_decoding_ViperLog(y)[source]

Defines the Viper Log log decoding curve / electro-optical transfer function.

Parameters:y (numeric or array_like) – Non-linear data \(y\).
Returns:Linear data \(x\).
Return type:numeric or ndarray

Examples

>>> log_decoding_ViperLog(0.636008067010413)  
0.1799999...
colour.models.rgb.transfer_functions.LOG_ENCODING_CURVES = CaseInsensitiveMapping({'ACEScc': <function log_encoding_ACEScc at 0x7f5de0a585f0>, 'REDLogFilm': <function log_encoding_REDLogFilm at 0x7f5de0a64b18>, 'REDLog': <function log_encoding_REDLog at 0x7f5de0a64a28>, 'ACESproxy': <function log_encoding_ACESproxy at 0x7f5de0a58500>, 'Canon Log': <function log_encoding_CanonLog at 0x7f5de0a64398>, 'Cineon': <function log_encoding_Cineon at 0x7f5de0a64488>, 'Panalog': <function log_encoding_Panalog at 0x7f5de0a64758>, 'PLog': <function log_encoding_PivotedLog at 0x7f5de0a64938>, 'ALEXA Log C': <function log_encoding_ALEXALogC at 0x7f5de0a5fd70>, 'S-Log2': <function log_encoding_SLog2 at 0x7f5de0a6f320>, 'S-Log3': <function log_encoding_SLog3 at 0x7f5de0a6f410>, 'V-Log': <function log_encoding_VLog at 0x7f5de0a64848>, 'ViperLog': <function log_encoding_ViperLog at 0x7f5de0a6f758>, 'S-Log': <function log_encoding_SLog at 0x7f5de0a6f230>})

Supported log encoding curves.

LOG_ENCODING_CURVES : CaseInsensitiveMapping
{‘Cineon’, ‘Panalog’, ‘ViperLog’, ‘PLog’, ‘Canon Log’, ‘ACEScc’, ‘ACESproxy’, ‘ALEXA Log C’, ‘REDLog’, ‘REDLogFilm’, ‘S-Log’, ‘S-Log2’, ‘S-Log3’, ‘V-Log’}
colour.models.rgb.transfer_functions.LOG_DECODING_CURVES = CaseInsensitiveMapping({'ACEScc': <function log_decoding_ACEScc at 0x7f5de0a58668>, 'REDLogFilm': <function log_decoding_REDLogFilm at 0x7f5de0a64b90>, 'REDLog': <function log_decoding_REDLog at 0x7f5de0a64aa0>, 'ACESproxy': <function log_decoding_ACESproxy at 0x7f5de0a58578>, 'Canon Log': <function log_decoding_CanonLog at 0x7f5de0a64410>, 'Cineon': <function log_decoding_Cineon at 0x7f5de0a64500>, 'Panalog': <function log_decoding_Panalog at 0x7f5de0a647d0>, 'PLog': <function log_decoding_PivotedLog at 0x7f5de0a649b0>, 'ALEXA Log C': <function log_decoding_ALEXALogC at 0x7f5de0a5fde8>, 'S-Log2': <function log_decoding_SLog2 at 0x7f5de0a6f398>, 'S-Log3': <function log_decoding_SLog3 at 0x7f5de0a6f488>, 'V-Log': <function log_decoding_VLog at 0x7f5de0a648c0>, 'ViperLog': <function log_decoding_ViperLog at 0x7f5de0a6f7d0>, 'S-Log': <function log_decoding_SLog at 0x7f5de0a6f2a8>})

Supported log decoding curves.

LOG_DECODING_CURVES : CaseInsensitiveMapping
{‘Cineon’, ‘Panalog’, ‘ViperLog’, ‘PLog’, ‘Canon Log’, ‘ACEScc’, ‘ACESproxy’, ‘ALEXA Log C’, ‘REDLog’, ‘REDLogFilm’, ‘S-Log’, ‘S-Log2’, ‘S-Log3’, ‘V-Log’}
colour.models.rgb.transfer_functions.log_encoding_curve(value, curve='Cineon', **kwargs)[source]

Encodes linear-light values to \(R'G'B'\) video component signal value using given log curve.

Parameters:
  • value (numeric or array_like) – Value.
  • curve (unicode, optional) – {‘Cineon’, ‘Panalog’, ‘ViperLog’, ‘PLog’, ‘Canon Log’, ‘ACEScc’, ‘ACESproxy’, ‘ALEXA Log C’, ‘REDLog’, ‘REDLogFilm’, ‘S-Log’, ‘S-Log2’, ‘S-Log3’, ‘V-Log’}, Computation curve.
  • **kwargs (dict, optional) – Keywords arguments.
Returns:

Log value.

Return type:

numeric or ndarray

Examples

>>> log_encoding_curve(0.18)  
0.4573196...
>>> log_encoding_curve(0.18, curve='ACEScc')  
0.4135884...
>>> log_encoding_curve(  
...     0.18, curve='PLog', log_reference=400)
0.3910068...
>>> log_encoding_curve(0.18, curve='S-Log')  
0.3599878...
colour.models.rgb.transfer_functions.log_decoding_curve(value, curve='Cineon', **kwargs)[source]

Decodes \(R'G'B'\) video component signal value to linear-light values using given log curve.

Parameters:
  • value (numeric or array_like) – Value.
  • curve (unicode, optional) – {‘Cineon’, ‘Panalog’, ‘ViperLog’, ‘PLog’, ‘Canon Log’, ‘ACEScc’, ‘ACESproxy’, ‘ALEXA Log C’, ‘REDLog’, ‘REDLogFilm’, ‘S-Log’, ‘S-Log2’, ‘S-Log3’, ‘V-Log’}, Computation curve.
  • **kwargs (dict, optional) – Keywords arguments.
Returns:

Log value.

Return type:

numeric or ndarray

Examples

>>> log_decoding_curve(0.457319613085418)  
0.1...
>>> log_decoding_curve(  
...     0.413588402492442, curve='ACEScc')
0.1...
>>> log_decoding_curve(  
...     0.391006842619746, curve='PLog', log_reference=400)
0.1...
>>> log_decoding_curve(  
...     0.359987846422154, curve='S-Log')
0.1...
colour.models.rgb.transfer_functions.OETFS = CaseInsensitiveMapping({'DCI-P3': <function oetf_DCIP3 at 0x7f5de0a64578>, 'BT.2020': <function oetf_BT2020 at 0x7f5de0a642a8>, 'BT.1886': <function oetf_BT1886 at 0x7f5de0a64050>, 'sRGB': <function oetf_sRGB at 0x7f5de0a6f140>, 'ST 2084': <function oetf_ST2084 at 0x7f5de0a6f668>, 'BT.709': <function oetf_BT709 at 0x7f5de0a5fed8>, 'ProPhoto RGB': <function oetf_ROMMRGB at 0x7f5de0a64cf8>})

Supported opto-electrical transfer functions (OETF / OECF).

OETFS : CaseInsensitiveMapping
{‘sRGB’, ‘BT.1886’, ‘BT.2020’, ‘BT.709’, ‘DCI-P3’, ‘ProPhoto RGB’, ‘ST 2084’}
colour.models.rgb.transfer_functions.EOTFS = CaseInsensitiveMapping({'DCI-P3': <function eotf_DCIP3 at 0x7f5de0a645f0>, 'BT.2020': <function eotf_BT2020 at 0x7f5de0a64320>, 'BT.1886': <function eotf_BT1886 at 0x7f5de0a640c8>, 'sRGB': <function eotf_sRGB at 0x7f5de0a6f1b8>, 'ST 2084': <function eotf_ST2084 at 0x7f5de0a6f6e0>, 'BT.709': <function eotf_BT709 at 0x7f5de0a5ff50>, 'ProPhoto RGB': <function eotf_ROMMRGB at 0x7f5de0a64d70>})

Supported electro-optical transfer functions (EOTF / EOCF).

EOTFS : CaseInsensitiveMapping
{‘sRGB’, ‘BT.1886’, ‘BT.2020’, ‘BT.709’, ‘DCI-P3’, ‘ProPhoto RGB’, ‘ST 2084’}
colour.models.rgb.transfer_functions.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’, ‘BT.1886’, ‘BT.2020’, ‘BT.709’, ‘DCI-P3’, ‘ProPhoto RGB’, ‘ST 2084’}, Computation function.
  • **kwargs (dict, optional) – Keywords arguments.
Returns:

\(R'G'B'\) video component signal value.

Return type:

numeric or ndarray

Examples

>>> oetf(0.18)  
0.4613561...
>>> oetf(0.18, function='BT.2020')  
0.4090077...
>>> oetf(  
...     0.18, function='ST 2084', L_p=1000)
0.1820115...
colour.models.rgb.transfer_functions.eotf(value, function='sRGB', **kwargs)[source]

Decodes \(R'G'B'\) video component signal value to tristimulus values at the display using given electro-optical transfer function (EOTF / EOCF).

Parameters:
  • value (numeric or array_like) – Value.
  • function (unicode, optional) – {‘sRGB’, ‘BT.1886’, ‘BT.2020’, ‘BT.709’, ‘DCI-P3’, ‘ProPhoto RGB’, ‘ST 2084’}, Computation function.
  • **kwargs (dict, optional) – Keywords arguments.
Returns:

Tristimulus values at the display.

Return type:

numeric or ndarray

Examples

>>> eotf(0.461356129500442)  
0.1...
>>> eotf(0.409007728864150,
...     function='BT.2020')  
0.1...
>>> eotf(  
...     0.182011532850008, function='ST 2084', L_p=1000)
0.1...