colour.models.log_encoding_CanonLog#
- colour.models.log_encoding_CanonLog(x: Domain1, bit_depth: int = 10, out_normalised_code_value: bool = True, in_reflection: bool = True, method: Literal['v1', 'v1.2'] | str = 'v1.2') Range1[source]#
Apply the Canon Log log encoding opto-electronic transfer function (OETF).
- Parameters:
x (Domain1) – Linear data \(x\).
bit_depth (int) – Bit-depth used for conversion.
out_normalised_code_value (bool) – Whether the Canon Log non-linear data is encoded as normalised code values.
in_reflection (bool) – Whether the light level \(x\) to a camera is reflection.
method (Literal['v1', 'v1.2'] | str) – Computation method.
- Returns:
Canon Log non-linear encoded data.
- Return type:
References
Notes
Domain
Scale - Reference
Scale - 1
x1
1
Range
Scale - Reference
Scale - 1
clog1
1
Examples
>>> log_encoding_CanonLog(0.18) * 100 34.3389649... >>> log_encoding_CanonLog(0.18, method="v1") * 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, method="v1") * (2**10 - 1)).astype(np.int_) array([ 128, 169, 351, 614, 1016]) >>> np.around(log_encoding_CanonLog(x, 10, False, method="v1") * 100, 1) array([ 7.3, 12. , 32.8, 62.7, 108.7])