colour.models.log_encoding_SLog#
- colour.models.log_encoding_SLog(x: Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1], bit_depth: int = 10, out_normalised_code_value: bool = True, in_reflection: bool = True) Annotated[ndarray[tuple[Any, ...], dtype[float16 | float32 | float64]], 1][source]#
Apply the Sony S-Log log encoding opto-electronic transfer function (OETF).
- Parameters:
x (Annotated[_Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str], 1]) – Reflection or \(IRE / 100\) input light level \(x\) to a camera.
bit_depth (int) – Bit-depth used for conversion.
out_normalised_code_value (bool) – Whether the Sony S-Log non-linear data \(y\) is encoded as normalised code values.
in_reflection (bool) – Whether the light level \(x\) to a camera is reflection.
- Returns:
Sony S-Log non-linear encoded data \(y\).
- Return type:
Notes
Domain
Scale - Reference
Scale - 1
x1
1
Range
Scale - Reference
Scale - 1
y1
1
References
Examples
>>> log_encoding_SLog(0.18) 0.3849708...
The values of IRE and CV of S-Log2 @ISO800 table in [SonyCorporation12] are obtained as follows:
>>> x = np.array([0, 18, 90]) / 100 >>> np.around(log_encoding_SLog(x, 10, False) * 100).astype(np.int_) array([ 3, 38, 65]) >>> np.around(log_encoding_SLog(x) * (2**10 - 1)).astype(np.int_) array([ 90, 394, 636])