colour.models.log_encoding_CanonLog

colour.models.log_encoding_CanonLog(x, bit_depth=10, out_normalised_code_value=True, in_reflection=True, **kwargs)[source]

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

Parameters
  • x (numeric or array_like) – Linear data \(x\).

  • bit_depth (int, optional) – Bit depth used for conversion.

  • out_normalised_code_value (bool, optional) – Whether the Canon Log non-linear data is encoded as normalised code values.

  • in_reflection (bool, optional) – Whether the light level \(x\) to a camera is reflection.

Other Parameters

**kwargs (dict, optional) – Keywords arguments for deprecation management.

Returns

Canon Log non-linear data.

Return type

numeric or ndarray

References

[Tho12]

Notes

Domain

Scale - Reference

Scale - 1

x

[0, 1]

[0, 1]

Range

Scale - Reference

Scale - 1

clog

[0, 1]

[0, 1]

Examples

>>> log_encoding_CanonLog(0.18) * 100  
34.3389651...

The values of Table 2 Canon-Log Code Values table in [Tho12] are obtained as follows:

>>> x = np.array([0, 2, 18, 90, 720]) / 100
>>> np.around(log_encoding_CanonLog(x) * (2 ** 10 - 1)).astype(np.int)
array([ 128,  169,  351,  614, 1016])
>>> np.around(log_encoding_CanonLog(x, 10, False) * 100, 1)
array([   7.3,   12. ,   32.8,   62.7,  108.7])